How to remove unused Linux kernels in Ubuntu Intrepid Ibex

After upgrading Ubuntu, you realize there are so many linux kernels in your system under /boot and also appear in the grub menu when you boot up your system. Hopefully you are booting into the latest kernel and you can check the version of your kernel by opening up terminal and typing uname -r. This is your kernel that you have to keep, while the others are just taking up space. To remove these unused kernels simply open up the synaptic package manager under system > administration and search for ‘linux-image-2.6’

removekernel

The installed kernels are marked with a shaded box. Click on the box and select mark for uninstallation. After selecting all the kernels you dont need, hit apply.

remkernel

Fortunately, the synaptic package manager is smart enough to remove these entries from the grub menu. If for some reason they are not removed, you can remove them by editing the menu.lst by typing sudo gedit /boot/grub/menu.lst