Sunday 3 July 2011

Posted by Admin | 0 comments

How to remove the old kernel on ubuntu

when we are updating the system on ubuntu, especially the kernel updates,Ubuntu always keeps the old kernel when it install a new one. The old kernel is not use again and should be deleted from your harddrive.

You can uninstall the old one by following this tutorials :

First you need to know what kernels version you are used now by following this command :

sudo uname -r

exp :the result is : 2.6.32-33-generic

Now you need to filters the kernels under 2.6.32- and remove the old kernels from the hard drive by following the command below :

dpkg --get-selections | grep 2.6.32

linux-headers-2.6.32-32 install
linux-headers-2.6.32-32-generic install
linux-headers-2.6.32-33 install
linux-headers-2.6.32-33-generic install
linux-image-2.6.32-32-generic install
linux-image-2.6.32-33-generic install

The old kernels is linux-headers-2.6.32-32 install and linux-image-2.6.32-32-generic install

Ok,Now you can remove the old kernels using this command :

sudo apt-get remove --purge 2.6.32-32-*

Doing this will uninstall the packages related to the 2.6.32-32 kernel, like “linux-image- linux-image-2.6.32-32″, “linux-restricted-modules- linux-image-2.6.32-32″

Good luck

0 comments: