Removing old kernels

My custom boot menu and, in particular, the latest Linux kernel (Version 2.6.32-29), are working just fine and so it’s time to clean up my system. In particular, I can now remove all the old Linux kernels that are not in use and which are just taking up space on the hard disk.

By doing so, these outdated kernels will no longer be included in any GRUB2 update, and hence won’t clutter up the listings on the boot menu. I can then simplify my custom boot set-up and, hopefully, prepare it to function more-or-less automatically next time a new kernel is downloaded.

The web is full of advice on how to remove old Linux kernels, including the use of some graphical utility programs. My preference is to list the kernels currently installed on my system, identify those that are no longer required, and use the Synaptic Package Manager to remove these.

In the previous posting, we saw a command that lists all the installed kernels, namely:

dpkg --list | grep linux-image

On my system, the kernels that were downloaded but never used were Linux 2.6.32-26 through Linux 2.6.32-28. These kernels can all be removed. However, I will retain Linux 2.6.32-24, as the last working version (an if-all-else-fails option!) And, of course, I must keep Linux 2.6.32-29, which is the kernel currently being used.

The specific procedure for removing the old, unused kernels is as follows:

1. Navigate to System – Administration – Synaptic Package Manager

2. In the Quick Search window, enter: linux-image-kernel version

3. Scroll down the list to find kernels where a green-shaded check box indicates that the version is installed

4. For any kernel(s) that are to be removed, click on the check box and select Mark for Complete Removal. A red X will now be shown in the check box.

5. Click on the Apply icon (the green check mark) on the menu bar

6. Confirm the removal by clicking on the Apply button the the Summary dialogue box

Re-booting the computer checks that Ubuntu is still working (Phew!) Re-running Synaptic Package Manager shows that only two kernels are now installed, 2.6.32-24.43 and 2.6.32-29.58. Success!

Now to refine the custom boot menu…


Need to remove old versions of Ubuntu kernel

How To Remove Old Kernel In Ubuntu 10.04 Lucid Lynx And Update Grub2 Menu

Customise Ubuntu with GRUB

This entry was posted in GRUB. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s