Created
July 17, 2014 07:18
-
-
Save alambike/7c050ab224ac47f52f9b to your computer and use it in GitHub Desktop.
Purge old kernel images, headers and modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://markmcb.com/2013/02/04/cleanup-unused-linux-kernels-in-ubuntu/ | |
| dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'| xargs sudo apt-get purge -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment