How To Remove Older Kernels from Ubuntu
Kernel: The Linux kernel is a Unix-like operating system kernel. It is the namesake of the Linux family of operating systems. Released under the GNU General Public License version 2 (GPLv2) and developed by contributors worldwide, Linux is one of the most prominent examples of free software.
Every time Ubuntu installs a new Linux kernel, the old one is left behind. This means that if you are regularly updating an Ubuntu system the Grub boot menu becomes longer and longer with kernels you don't need anymore.
The old kernels are deliberately left installed and on the menu so you can boot a previous kernel if you have trouble with a new one. But if the new one works, you can safely uninstall the old kernel, which will also result in the Grub menu being cleaned up.
First you need to find out what your current kernel is. 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.20-16-generic
Remove Old Kernels:
First Way:
Open the Synaptic package manager from the System->Administration menu.
Click the "Search" button on the tool bar and search for linux-image-2.
The results should show every available and installed kernel. A green box on the left indicates that the package is installed. The only linux-image you want installed is the latest one. Find the package corresponding to the kernel to you running currently (this is the kernel you found in the terminal window). Make sure you keep that one. Now you can uninstall the old kernels from the list by clicking their boxes and selecting "Mark for Removal".
Click the apply button on the tool bar to complete the changes.
Your computer and Grub menu should now be free of old kernels.
Second Way:
Bunch of kernels:
$ ls /boot/
Remove particular Kernel version:
$ sudo apt-get remove linux-image-2.6.22-14-generic
If you need to check what other kernels you have installed, do this:
$ dpkg --get-selections | grep linux-image-2.6.2
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 possible to break Ubuntu if you remove the wrong kernel.
Resource:
http://tombuntu.com/index.php/2007/10/17/remove-ubuntu-kernels-you-dont-...
http://www.alterego7.com/2008/04/removing-those-extra-kernels-in-ubuntu....
http://www.foogazi.com/2008/07/02/quickzi-how-to-remove-older-kernels-fr...
Recent comments