Monday, 15 September 2008

Delete Old Kernels and Clean-Up Grub Boot Menu

Every time Ubuntu upgrades its kernel the old ones are not removed. This means that over time your Grub boot menu list will grow in size with old kernels. The old kernels may be useful in the event your main one stops working.

Intrepid Ibex will come with a tool that will automatically do the clean-up, but until then you can use the following method.

The first thing you need to do is find out what your current kernel is. You can do this by entering the following command into your terminal:

uname -r

Your should see a result similar to this:


Remember this is your current kernel, the one you want to keep so make a note of it.

Now you need to find the old kernels. You can do this using the Synaptic package manager. Once in Synaptic, search for linux-image-2. You will be presented with a list of the installed kernels, the green boxes next to them indicates which ones are installed. Uncheck all the green boxes, except for the current kernel, selecting "Mark for removal" on each one. Once you are happy with your selection and you are sure you haven't chosen to remove the current kernel, go ahead and hit the apply button.

Some people prefer to leave one old kernel behind just in case the main one fails but that's entirely up to you. The next time you start your computer you should see a much smaller Grub menu.

Share me
 Digg Stumble Delicious Technorati Twitter Facebook Subscribe
Leave a Comment


Post a Comment

Creative Commons License
This work is licenced under a Creative Commons Licence. Terms and Conditions.