Monday, September 15, 2008

CentOS 4 - How to remove old Kernel versions?

Over time you get many obsolete kernel versions in CentOS4 (or RedHat Server 4).
The yum update feature installs new kernel versions, but doesn't remove old ones.

This fills up /boot more and more.

Here is how to get rid of the old kernel versions in a clean manner:

What kernels are installed:
yum list installed | grep -i kernel

Uninstall old version kernel-VERSION
Example: yum remove kernel-2.6.9-67.0.22.EL

Warning: Do not deinstall the most recent version. You might hose your system...

Tip:
On a SMP system, CentOS installs both UP and SMP versions of the kernel.
Therefore, remove both kernels.

CentOS5 by default keeps only the 4 most recent kernel versions. Therefore, no action must be performed on this system.


No comments: