Remove Old Linux Kernel, Clean Up Boot Menu


Remove Old Linux Kernel, Clean Up Boot Menu


Each time when Ubuntu updates to a new Linux kernel, the old one is left behind and the boot menu gets longer. If your new Linux kernel works well, it's safe to remove the old one and clean up the boot menu. Do take these steps carefully as incorrect removal of the items can make your system unbootable.

Go to Applications (or Main Menu) > Accessories > Terminal.
Enter uname -r to print the Linux kernel version you're running (e.g. 2.6.32-22-generic).
Go to System > Administration > Synaptic Package Manager.
Click Status from the left panel and select Installed.
Enter the main version number (e.g. 2.6.32) in the Search box.
Right-click the items with smaller sub version number (e.g. 2.6.32-21) for older Linux kernel and select Mark for Complete Removal. The files for the older version to remove may include linux-headers-2.6.32-21, linux-headers-2.6.32-21-generic and linux-image-2.6.32-21-generic.
Click Apply from the top panel.
Click Apply again from the pop-up window to confirm removal of the marked packages. The boot menu will be cleaned up automatically after the removal is confirmed.