# rpm -qa | grep kernel-2 | sort kernel-2.6.9-42.0.10.EL kernel-2.6.9-42.0.2.EL kernel-2.6.9-42.0.3.EL kernel-2.6.9-42.0.8.EL kernel-2.6.9-42.EL kernel-2.6.9-55.0.2.EL kernel-2.6.9-55.0.6.EL kernel-2.6.9-55.0.9.EL kernel-2.6.9-55.EL
I'm running the most recent kernel available, and I've never had a problem with any past kernels, so I don't believe there's any reason to keep all of them. I guess kernels get a fresh install instead of an upgrade? Can I safely rpm-e the old kernel packages? Should this be something I do through yum instead?
Some of my CentOS servers have even more old kernels than this sample.
Thanks, Scott
Scott Moseman wrote:
# rpm -qa | grep kernel-2 | sort kernel-2.6.9-42.0.10.EL kernel-2.6.9-42.0.2.EL kernel-2.6.9-42.0.3.EL kernel-2.6.9-42.0.8.EL kernel-2.6.9-42.EL kernel-2.6.9-55.0.2.EL kernel-2.6.9-55.0.6.EL kernel-2.6.9-55.0.9.EL kernel-2.6.9-55.EL
I'm running the most recent kernel available, and I've never had a problem with any past kernels, so I don't believe there's any reason to keep all of them. I guess kernels get a fresh install instead of an upgrade? Can I safely rpm-e the old kernel packages? Should this be something I do through yum instead?
I'm not really sure of the correct method, but I've gotten into the habit of using rpm -e. I usually keep the current kernel plus the previous one and dump the rest.
Best,
On 12/10/2007, at 10:53 PM, Scott Moseman wrote:
# rpm -qa | grep kernel-2 | sort kernel-2.6.9-42.0.10.EL kernel-2.6.9-42.0.2.EL kernel-2.6.9-42.0.3.EL kernel-2.6.9-42.0.8.EL kernel-2.6.9-42.EL kernel-2.6.9-55.0.2.EL kernel-2.6.9-55.0.6.EL kernel-2.6.9-55.0.9.EL kernel-2.6.9-55.EL
I'm running the most recent kernel available, and I've never had a problem with any past kernels, so I don't believe there's any reason to keep all of them. I guess kernels get a fresh install instead of an upgrade? Can I safely rpm-e the old kernel packages? Should this be something I do through yum instead?
Yep, you just do (for example)
yum remove kernel-2.6.9-42.0.10
i.e. specify the exact version in the remove statement.
Be very very careful... don't remove the kernel you're running.
this should also remove the entries in your grub.conf, but check it once you're done.
Some of my CentOS servers have even more old kernels than this sample.
You might be able to remove a bunch of them in one go if you do something like:
yum remove kernel-2.6.9-42*
again, be careful, double check what you're doing, don't make a silly mistake and remove the wrong kernel(s)
Note: if you've installed any RPM modules that depend on specific versions of kernels, yum will (correctly) want to remove those too.
Cheers,
Michael
On 10/12/07, Michael Kratz mkratz@internode.com.au wrote:
yum remove kernel-2.6.9-42*
This method worked great for getting the kernels cleaned up.
Thanks for the help, folks. Scott
Michael Kratz pisze:
Be very very careful... don't remove the kernel you're running.
after removing actually running kernel, the system will operate properly, because kernel and modules are in RAM; so unless you try to load a kernel module, or reboot, you are safe
I sometimes make mistakes and remove kernel before installing a new one, and it works as good as removing it after installing new
On Friday 12 October 2007, Scott Moseman wrote:
# rpm -qa | grep kernel-2 | sort kernel-2.6.9-42.0.10.EL kernel-2.6.9-42.0.2.EL kernel-2.6.9-42.0.3.EL kernel-2.6.9-42.0.8.EL kernel-2.6.9-42.EL kernel-2.6.9-55.0.2.EL kernel-2.6.9-55.0.6.EL kernel-2.6.9-55.0.9.EL kernel-2.6.9-55.EL
I'm running the most recent kernel available, and I've never had a problem with any past kernels, so I don't believe there's any reason to keep all of them. I guess kernels get a fresh install instead of an upgrade? Can I safely rpm-e the old kernel packages?
Yes, this is safe (for kernels you don't run/need).
/Peter
On 10/12/07, Scott Moseman scmoseman@gmail.com wrote:
I'm running the most recent kernel available, and I've never had a problem with any past kernels, so I don't believe there's any reason to keep all of them. I guess kernels get a fresh install instead of an upgrade? Can I safely rpm-e the old kernel packages? Should this be something I do through yum instead?
yum install yum-utils package-cleanup --oldkernels --count 2
(Increase the count to keep more kernels.)