Skip to content

Instantly share code, notes, and snippets.

@friedemannsommer
Last active March 23, 2016 22:04
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 friedemannsommer/2f2d6ffa63bbbefcc64f to your computer and use it in GitHub Desktop.
Save friedemannsommer/2f2d6ffa63bbbefcc64f to your computer and use it in GitHub Desktop.
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d;/^linux-\(headers\|image\)/!d'
after this command remove the listed packages with:
sudo apt-get -y purge <package>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment