Skip to content

Instantly share code, notes, and snippets.

@bitle
Created November 18, 2015 18:47
Show Gist options
  • Save bitle/88d48eee49c1f0165eed to your computer and use it in GitHub Desktop.
Save bitle/88d48eee49c1f0165eed to your computer and use it in GitHub Desktop.
Kill defunct processes
# Find all parents and kill the whole process tree
ps xao pgid,ppid,pid,comm | grep defunct | awk '{print -$2}' | sort -n | uniq -d | xargs sudo kill -9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment