Created
January 10, 2018 08:28
-
-
Save stroebs/fc31f2f2ae65be54089373a8c32147b7 to your computer and use it in GitHub Desktop.
Ubuntu Kernel cleanup one-liner
This file contains 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
for kernel in `dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r) |grep "ii" |awk '{print $2}'` ; do dpkg --purge $kernel; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment