Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does yum remove obsolete packages (RHEL) 1

Status
Not open for further replies.

tumichaelf

IS-IT--Management
May 17, 2011
33
US
Hello,

When I run "yum update", does this remove the obsolete packages as it upgrades to newer versions?

I ask because the Information Security group at my company has shown that the servers I manage have an older kernel package on them, even though they have been completely upgraded, and according to RHN they are fully up-to-date.

I half-answer my own question with the following command
Code:
yum list installed|grep kernel
kernel.x86_64                              2.6.18-238.1.1.el5          installed
kernel.x86_64                              2.6.18-274.el5              installed
kernel-devel.x86_64                        2.6.18-238.1.1.el5          installed
kernel-devel.x86_64                        2.6.18-274.el5              installed
kernel-headers.x86_64                      2.6.18-274.el5              installed

but my question is, is it safe for me to just to uninstall the old kernel's, and how?

Thanks,

Michael
 
It's normal to install rather than upgrade the kernel since it gives you a failsafe if you can't boot the new kernel.

You can remove old versions with Yum or RPM, just specify the full package name (kernel-2.6.18-238.1.1.el5) instead of just "kernel", and make sure you don't remove the current version (uname -r to check).

Using Yum also gives you that a chance to confirm that you're removing the right one. I'm pretty sure that removing the package also updates the grub.conf, but not 100% so check that also.
 
so in essence you are saying I should do the following

1)
Code:
[root@host ~]# yum list installed|grep kernel
kernel.x86_64                              2.6.18-238.1.1.el5          installed
kernel.x86_64                              2.6.18-274.el5              installed
kernel-devel.x86_64                        2.6.18-238.1.1.el5          installed
kernel-devel.x86_64                        2.6.18-274.el5              installed
kernel-headers.x86_64                      2.6.18-238.1.1.el5          installed
kernel-headers.x86_64                      2.6.18-274.el5              installed
2)
Code:
[root@host ~]# uname -r
2.6.18-238.1.1.el5
3)
Code:
yum remove kernel-2.6.18-274.el5
yum remove kernel-devel.x86_64-2.6.18-274.el5
yum remove kernel-headers.x86_64-2.6.18-274.el5

Is that correct?
 
is there a way to change kernels without rebooting a server?
 
Not currently. There's been some work done in that area, but frankly I don't see much point and probably won't use the feature if it ever becomes mainstream.

I'd suggest rebooting to the new kernel & removing the old one, rather than removing the new one. -274 is the newest one you have, -238 is the older version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top