-
-
Save snoj/6999266723c78192816ef056fdcf610f 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 -y; | |
update-grub; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment