I have the following kernels on my /boot:
2.6.18-128.1.6 2.6.18-92.1.18 2.6.18-92.1.22
I'm low on /boot space and need to remove the oldest version. It appears that I cannot use yum to remove since all of the versions are the same (only the release is different). I believe that I can use rpm to remove the old version, but I also need to remove them from the grub.conf. Any other considerations and/or methods?
Frank M. Ramaekers Jr. Systems Programmer MCP, MCP+I, MCSE & RHCE American Income Life Insurance Co. Phone: (254)761-6649 1200 Wooded Acres Dr. Fax: (254)741-5777 Waco, Texas 76710
_____________________________________________________ This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at PrivacyAct@ailife.com.
On Wed, 3 Jun 2009, Frank M. Ramaekers wrote:
I have the following kernels on my /boot:
2.6.18-128.1.6 2.6.18-92.1.18 2.6.18-92.1.22
I'm low on /boot space and need to remove the oldest version. It appears that I cannot use yum to remove since all of the versions are the same (only the release is different). I believe that I can use rpm to remove the old version, but I also need to remove them from the grub.conf. Any other considerations and/or methods?
Do an "rpm -q kernel" to make sure those are it. Then what I do is simply this:
rpm -e kernel-2.6.18-92.1.18
rpm -e kernel-2.6.18-92.1.22
******************************************************************************* Gilbert Sebenste ******** (My opinions only!) ****** *******************************************************************************
On Jun 3, 2009, at 1:40 PM, Frank M. Ramaekers wrote:
I have the following kernels on my /boot:
2.6.18-128.1.6 2.6.18-92.1.18 2.6.18-92.1.22
I'm low on /boot space and need to remove the oldest version. It appears that I cannot use yum to remove since all of the versions are the same (only the release is different). I believe that I can use rpm to remove the old version, but I also need to remove them from the grub.conf. Any other considerations and/or methods?
you can indeed use yum to remove them; why would you think you could not?
$ sudo yum remove kernel-2.6.18-128.1.6.el5 kernel- devel-2.6.18-128.1.6.el5 kernel-2.6.18-92.1.18.el5 kernel- devel-2.6.18-92.1.18.el5 kernel-2.6.18-92.1.22.el5 kernel- devel-2.6.18-92.1.22.el5
-steve
-- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v http://five.sentenc.es
Running Transaction Erasing : kernel [1/1]
Removed: kernel.i686 0:2.6.18-92.1.18.el5 Complete!
That seemed to work, but I still have some 92.1.18 elements left: ls -l /boot/*92.1.18* -rw-r--r-- 1 root root 65438 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 65364 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 65292 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5xen -rw------- 1 root root 3151859 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5debug.img -rw------- 1 root root 3148814 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5PAE.img -rw------- 1 root root 3148909 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5xen.img -rw-r--r-- 1 root root 92220 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5debug.gz -rw-r--r-- 1 root root 91787 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5PAE.gz -rw-r--r-- 1 root root 93282 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5xen.gz -rw-r--r-- 1 root root 926863 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 910396 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 908613 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5xen -rw-r--r-- 1 root root 1984020 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 1802932 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 2162864 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5xen -rw-r--r-- 1 root root 328836 Nov 12 2008 /boot/xen.gz-2.6.18-92.1.18.el5 -rwxr-xr-x 1 root root 714752 Nov 12 2008 /boot/xen-syms-2.6.18-92.1.18.el5
Frank M. Ramaekers Jr. Systems Programmer MCP, MCP+I, MCSE & RHCE American Income Life Insurance Co. Phone: (254)761-6649 1200 Wooded Acres Dr. Fax: (254)741-5777 Waco, Texas 76710
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Steve Huff Sent: Wednesday, June 03, 2009 12:49 PM To: CentOS mailing list Subject: Re: [CentOS] Removing old kernels
On Jun 3, 2009, at 1:40 PM, Frank M. Ramaekers wrote:
I have the following kernels on my /boot:
2.6.18-128.1.6 2.6.18-92.1.18 2.6.18-92.1.22
I'm low on /boot space and need to remove the oldest version. It appears that I cannot use yum to remove since all of the versions are the same (only the release is different). I believe that I can use rpm to remove the old version, but I also need to remove them from the grub.conf. Any other considerations and/or methods?
you can indeed use yum to remove them; why would you think you could not?
$ sudo yum remove kernel-2.6.18-128.1.6.el5 kernel- devel-2.6.18-128.1.6.el5 kernel-2.6.18-92.1.18.el5 kernel- devel-2.6.18-92.1.18.el5 kernel-2.6.18-92.1.22.el5 kernel- devel-2.6.18-92.1.22.el5
-steve
-- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v http://five.sentenc.es
_____________________________________________________ This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at PrivacyAct@ailife.com.
Nevermind....figured it out.
Thanks,
Frank M. Ramaekers Jr. Systems Programmer MCP, MCP+I, MCSE & RHCE American Income Life Insurance Co. Phone: (254)761-6649 1200 Wooded Acres Dr. Fax: (254)741-5777 Waco, Texas 76710
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Frank M. Ramaekers Sent: Wednesday, June 03, 2009 1:38 PM To: CentOS mailing list Subject: Re: [CentOS] Removing old kernels
Running Transaction Erasing : kernel [1/1]
Removed: kernel.i686 0:2.6.18-92.1.18.el5 Complete!
That seemed to work, but I still have some 92.1.18 elements left: ls -l /boot/*92.1.18* -rw-r--r-- 1 root root 65438 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 65364 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 65292 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5xen -rw------- 1 root root 3151859 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5debug.img -rw------- 1 root root 3148814 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5PAE.img -rw------- 1 root root 3148909 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5xen.img -rw-r--r-- 1 root root 92220 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5debug.gz -rw-r--r-- 1 root root 91787 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5PAE.gz -rw-r--r-- 1 root root 93282 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5xen.gz -rw-r--r-- 1 root root 926863 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 910396 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 908613 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5xen -rw-r--r-- 1 root root 1984020 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 1802932 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 2162864 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5xen -rw-r--r-- 1 root root 328836 Nov 12 2008 /boot/xen.gz-2.6.18-92.1.18.el5 -rwxr-xr-x 1 root root 714752 Nov 12 2008 /boot/xen-syms-2.6.18-92.1.18.el5
Frank M. Ramaekers Jr. Systems Programmer MCP, MCP+I, MCSE & RHCE American Income Life Insurance Co. Phone: (254)761-6649 1200 Wooded Acres Dr. Fax: (254)741-5777 Waco, Texas 76710
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Steve Huff Sent: Wednesday, June 03, 2009 12:49 PM To: CentOS mailing list Subject: Re: [CentOS] Removing old kernels
On Jun 3, 2009, at 1:40 PM, Frank M. Ramaekers wrote:
I have the following kernels on my /boot:
2.6.18-128.1.6 2.6.18-92.1.18 2.6.18-92.1.22
I'm low on /boot space and need to remove the oldest version. It appears that I cannot use yum to remove since all of the versions are the same (only the release is different). I believe that I can use rpm to remove the old version, but I also need to remove them from the grub.conf. Any other considerations and/or methods?
you can indeed use yum to remove them; why would you think you could not?
$ sudo yum remove kernel-2.6.18-128.1.6.el5 kernel- devel-2.6.18-128.1.6.el5 kernel-2.6.18-92.1.18.el5 kernel- devel-2.6.18-92.1.18.el5 kernel-2.6.18-92.1.22.el5 kernel- devel-2.6.18-92.1.22.el5
-steve
-- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v http://five.sentenc.es
_____________________________________________________ This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at PrivacyAct@ailife.com. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
_____________________________________________________ This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at PrivacyAct@ailife.com.
Frank M. Ramaekers wrote:
Running Transaction Erasing : kernel [1/1]
Removed: kernel.i686 0:2.6.18-92.1.18.el5 Complete!
That seemed to work, but I still have some 92.1.18 elements left: ls -l /boot/*92.1.18* /boot/config-2.6.18-92.1.18.el5debug /boot/config-2.6.18-92.1.18.el5PAE /boot/config-2.6.18-92.1.18.el5xen
the debug, PAE, and xen kernels are from different packages. To see what all is actually installed on your system, you just might do...
# rpm -qa |grep ^kernel kernel-2.6.18-92.1.18.el5 kernel-devel-2.6.18-92.1.18.el5 kernel-2.6.18-92.1.22.el5 kernel-2.6.18-128.1.6.el5 kernel-devel-2.6.18-92.1.22.el5 kernel-devel-2.6.18-128.1.6.el5 kernel-headers-2.6.18-128.1.6.el5
in your case, I'd likely do...
# yum erase kernel-PAE-2.6.18-92.1.18 kernel-debug-2.6.18-92.1.18 kernel-xen-2.6.18-92.1.18
On Jun 3, 2009, at 2:37 PM, Frank M. Ramaekers wrote:
That seemed to work, but I still have some 92.1.18 elements left: ls -l /boot/*92.1.18* -rw-r--r-- 1 root root 65438 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5debug
for each file, find out what package it belongs to, and then remove it:
$ rpm -qf /boot/config-2.6.18-92.1.18.el5debug | xargs sudo yum remove
-steve -- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v http://five.sentenc.es
At Wed, 3 Jun 2009 13:37:56 -0500 CentOS mailing list centos@centos.org wrote:
Running Transaction Erasing : kernel [1/1]
Removed: kernel.i686 0:2.6.18-92.1.18.el5 Complete!
That seemed to work, but I still have some 92.1.18 elements left: ls -l /boot/*92.1.18* -rw-r--r-- 1 root root 65438 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 65364 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 65292 Nov 12 2008 /boot/config-2.6.18-92.1.18.el5xen -rw------- 1 root root 3151859 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5debug.img -rw------- 1 root root 3148814 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5PAE.img -rw------- 1 root root 3148909 Nov 13 2008 /boot/initrd-2.6.18-92.1.18.el5xen.img -rw-r--r-- 1 root root 92220 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5debug.gz -rw-r--r-- 1 root root 91787 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5PAE.gz -rw-r--r-- 1 root root 93282 Nov 12 2008 /boot/symvers-2.6.18-92.1.18.el5xen.gz -rw-r--r-- 1 root root 926863 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 910396 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 908613 Nov 12 2008 /boot/System.map-2.6.18-92.1.18.el5xen -rw-r--r-- 1 root root 1984020 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5debug -rw-r--r-- 1 root root 1802932 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5PAE -rw-r--r-- 1 root root 2162864 Nov 12 2008 /boot/vmlinuz-2.6.18-92.1.18.el5xen -rw-r--r-- 1 root root 328836 Nov 12 2008 /boot/xen.gz-2.6.18-92.1.18.el5 -rwxr-xr-x 1 root root 714752 Nov 12 2008 /boot/xen-syms-2.6.18-92.1.18.el5
rpm -e kernel-2.6.18-92.1.18.el5debug ...
(Make *sure* you are not actually running any of these kernels!).
Note: yum clean old-kernels keeps the last N kernels (I'm not sure what N is and it is probably a config parameter somewhere).
Frank M. Ramaekers Jr. Systems Programmer MCP, MCP+I, MCSE & RHCE American Income Life Insurance Co. Phone: (254)761-6649 1200 Wooded Acres Dr. Fax: (254)741-5777 Waco, Texas 76710
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Steve Huff Sent: Wednesday, June 03, 2009 12:49 PM To: CentOS mailing list Subject: Re: [CentOS] Removing old kernels
On Jun 3, 2009, at 1:40 PM, Frank M. Ramaekers wrote:
I have the following kernels on my /boot:
2.6.18-128.1.6 2.6.18-92.1.18 2.6.18-92.1.22
I'm low on /boot space and need to remove the oldest version. It appears that I cannot use yum to remove since all of the versions are the same (only the release is different). I believe that I can use rpm to remove the old version, but I also need to remove them from the grub.conf. Any other considerations and/or methods?
you can indeed use yum to remove them; why would you think you could not?
$ sudo yum remove kernel-2.6.18-128.1.6.el5 kernel- devel-2.6.18-128.1.6.el5 kernel-2.6.18-92.1.18.el5 kernel- devel-2.6.18-92.1.18.el5 kernel-2.6.18-92.1.22.el5 kernel- devel-2.6.18-92.1.22.el5
-steve
-- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v http://five.sentenc.es
This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at PrivacyAct@ailife.com. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Wed, 2009-06-03 at 14:50 -0400, Robert Heller wrote:
At Wed, 3 Jun 2009 13:37:56 -0500 CentOS mailing list centos@centos.org wrote:
<snip>
rpm -e kernel-2.6.18-92.1.18.el5debug ...
(Make *sure* you are not actually running any of these kernels!).
Note: yum clean old-kernels keeps the last N kernels (I'm not sure what N is and it is probably a config parameter somewhere).
/etc/yum.conf
installonlypkgs and installonly_limit
See "man yum.conf"
<snip>
HTH
On Wed, 03 Jun 2009 12:40:08 -0500 Frank M. Ramaekers wrote:
Any other considerations and/or methods?
yum install yum-utils package-cleanup --oldkernels
Frank M. Ramaekers wrote:
I have the following kernels on my /boot:
2.6.18-128.1.6 2.6.18-92.1.18 2.6.18-92.1.22
I'm low on /boot space and need to remove the oldest version. It appears that I cannot use yum to remove since all of the versions are the same (only the release is different). I believe that I can use rpm to remove the old version, but I also need to remove them from the grub.conf. Any other considerations and/or methods?
You can also have the installonlyn limit bumped up if you want to automatically only keep n number of kernels.
# vim /etc/yum.conf installonly_limit = n
Set n to the number you want to keep.
Regards, Max