diff --git a/sbin/kernel-clean.sh b/sbin/kernel-clean.sh index bbe1495..c9f258d 100755 --- a/sbin/kernel-clean.sh +++ b/sbin/kernel-clean.sh @@ -11,7 +11,7 @@ cd /lib/modules && rm -rf `ls | grep -v "^$REVISION$"` # rm old kernel revisions mount -o remount,rw /boot -cd /boot && rm -f `ls System.map-* config-* vmlinuz-* 2>/dev/null | grep -v "$REVISION$"` +cd /boot && rm -f `ls System.map-* config-* vmlinuz-* initramfs-* 2>/dev/null | grep -vE "$REVISION$|$REVISION.img$"` mount -o remount,ro /boot # rm old sources