# 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 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: <http://lists.centos.org/pipermail/centos/attachments/20071012/731c87c5/attachment-0004.sig>
On 10/12/07, Scott Moseman <scmoseman at 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.)