Mar 11, 2010

Remove Old Kernel Images From Ubuntu

Every time a kernel update is made available in Ubuntu and if you are updating your system regularly, then the GRUB boot menu becomes longer and longer. If the latest updated kernel is not working, you are provided to boot with old kernel images that worked for you in the boot menu. And if the updated kernel works flawlessly on your system, you would feel the old boot entries or old kernel images unnecessary.

So then how to remove these boot entries that points to the old kernel images that we won't need?

Follow these steps and remove the old kernel images and clean up your GRUB boot menu.

First you need to find out what is the current kernel you are using. Open a terminal and run the following command:
uname -r
It will print the version of the Linux kernel you are running, this is the one you want to keep. It should look something like this:
2.6.31-20-generic
Open the Synaptic package manager from the System->Administration menu.
And search for 'linux-image-2.6' without quotes.

The results should show every currently installed as well as available kernel. Uncheck the kernel images you want to uninstall. But be careful to keep the latest one we found with the previous command.

Click the apply button on the toolbar to complete the changes.

Caution! Be careful of what you remove. Ensure that you don’t remove your current kernel, or anything that is not a linux-image. It is necessary to keep at least one kernel image to boot your system. It is possible to break Ubuntu if you remove the wrong kernel.

Also it is necessary to restart your system for applications like VirtualBox to work.

Your computer and Grub menu should now be free of old kernels.

No comments:

Post a Comment