Skip to content

Instantly share code, notes, and snippets.

@n0ts
Created May 7, 2014 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n0ts/886b571c006bcbf7e765 to your computer and use it in GitHub Desktop.
Save n0ts/886b571c006bcbf7e765 to your computer and use it in GitHub Desktop.
Remove old kernel
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment