Created
October 30, 2014 02:21
-
-
Save anonymous/8b43f397cda1b790f7de to your computer and use it in GitHub Desktop.
Cleans the /boot folder of all images that is not what is running.
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
#!/bin/bash | |
aptitude search linux-image* -F "%c %p" | grep -E "^i.*" | grep -v -E "\slinux-image-generic\s" | grep -v -E `(uname -r | awk '{split($0, a, "-[a-z]"); print a[1];'})` | awk '{ print $2; }' | xargs aptitude remove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment