Originally posted here:http://www.go2linux.org/clean-linux-...ages-grub-menu by Deven
Just too damn good not to share. Especially seeing as how when I attempted to manually remove the old kernels I ended up spending a few hours getting a kernel back on after deleting all of them.

ls /boot/ | grep vmlinuz | sed 's@vmlinuz-@linux-image-@g' | grep -v `uname -r` > /tmp/kernelList
for I in `cat /tmp/kernelList`
aptitude remove $I
rm -f /tmp/kernelList 
update-grub #not sure if needed
save as cleanKernels.sh
Execute as root or chmod 755 it.
sudo bash cleanKernels.sh
Yippee you just freed up some disk space!