Skip to content

Instantly share code, notes, and snippets.

@dennmart
Created December 10, 2010 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennmart/736495 to your computer and use it in GitHub Desktop.
Save dennmart/736495 to your computer and use it in GitHub Desktop.
#/bin/bash
ls /boot/ | grep vmlinuz | sed 's@vmlinuz-@linux-image-@g' | grep -v `uname -r` > /tmp/kernelList
for I in `cat /tmp/kernelList`
do
aptitude remove $I
done
rm -f /tmp/kernelList
update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment