Terry : Remove old Linux kernel

Remove old Linux kernel

Check the /lib/modules folder to see a full list of old kernels installed or previously installed now removed.

Normally distributions will keep at least 2 kernels in case the new kernel doesn't work well, you have a choice to roll back.

Debian or Ubuntu

Remove 2.6.24-21-generic, APT will remove the packages and regenerate GRUB menu.lst.

Ubuntu

apt-get remove --purge 2.6.24-21-generic*

Ubuntu Server

apt-get remove --purge 2.6.24-21-server*

Debian GNU/Linux

apt-get remove --purge 2.6.30-1*

RHEL and OEL

Check folder /lib/modules for a list of installed kernels.

rpm -qa | grep 2.6.18-92

Output:

[root@linux ~]# rpm -qa | grep 2.6.18-92
kernel-2.6.18-92.el5
kernel-devel-2.6.18-92.el5

Get a list of packages, remove it by using yum.

yum remove kernel-2.6.18-92.el5 kernel-devel-2.6.18-92.el5

Note: The corresponding folder in /lib/modules will not be removed by package management tool.

Attachments:

rhel.txt (text/plain)