Hi.
Is there any commad for eliminate old kernels from grub instead of edit manually grub.conf and eliminate the files from /boot?
Iago.
iagosineiro@yahoo.es wrote:
Hi.
Is there any commad for eliminate old kernels from grub instead of edit manually grub.conf and eliminate the files from /boot?
yum erase kernel-<version>-<release>.{arch}
on its way out, it will clean up the lilo.conf and/or grub.conf as you have setup.
- K
iagosineiro@yahoo.es wrote:
Is there any commad for eliminate old kernels from grub instead of edit manually grub.conf and eliminate the files from /boot?
To see which kernels are installed: rpm -qa | grep kernel
then remove via : yum remove kernel-2.6.9-11.EL
(assuming that's the kernel you wish to remove).
Regards,
Sean
Quoting Sean O Sullivan seanos@seanos.net:
iagosineiro@yahoo.es wrote:
Is there any commad for eliminate old kernels from grub instead of edit manually grub.conf and eliminate the files from /boot?
To see which kernels are installed: rpm -qa | grep kernel
then remove via : yum remove kernel-2.6.9-11.EL
Ah... Useless use of grep category ;-)
Much faster (esp. if on older hardware):
# rpm -q kernel kernel-smp kernel-hugemem kernel-devel kernel-2.6.9-11.EL kernel-2.6.9-22.EL kernel-2.6.9-22.0.1.EL package kernel-smp is not installed package kernel-hugemem is not installed package kernel-devel is not installed # rpm -e kernel-2.6.9-11.EL kernel-2.6.9-22.EL
And you are done... Basically, it is the same as removing any other package. The rpm command can accept as argument either just a package name (kernel) or package name and version (kernel-2.6.9-11.EL).
If you type only "rpm -e kernel", you'll get error message telling you more than one version of the package matches. There's an option '--allmatches' to remove all versions, but you do not want to use it in this case (you need at least one version of kernel installed).
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On 11/9/05, iagosineiro@yahoo.es iagosineiro@yahoo.es wrote:
Is there any commad for eliminate old kernels from grub instead of edit manually grub.conf and eliminate the files from /boot?
Yum-utils includes a script called package-cleanup. Running "package-cleanup --oldkernels" will take care of this for you, without having to check kernel versions by hand.
You can get yum-utils from http://linux.duke.edu/yum/download/yum-utils/. It's also part of Fedora Extras; since it's a noarch package, you could probably just download the RPM from there and install it on a CentOS 4 box, although I haven't tried this.
Josh Kelley
On Wed, Nov 09, 2005 at 10:04:34AM -0500, Josh Kelley enlightened us:
Is there any commad for eliminate old kernels from grub instead of edit manually grub.conf and eliminate the files from /boot?
Yum-utils includes a script called package-cleanup. Running "package-cleanup --oldkernels" will take care of this for you, without having to check kernel versions by hand.
Good to know.
You can get yum-utils from http://linux.duke.edu/yum/download/yum-utils/. It's also part of Fedora Extras; since it's a noarch package, you could probably just download the RPM from there and install it on a CentOS 4 box, although I haven't tried this.
Only if the versions of python are the same.
Rebuilding the src.rpm is probably better. Karanbir might also have it in his repository at http://centos.karan.org.
Matt
On Wed, Nov 09, 2005 at 10:04:34AM -0500, Josh Kelley wrote:
On 11/9/05, iagosineiro@yahoo.es iagosineiro@yahoo.es wrote:
Is there any commad for eliminate old kernels from grub instead of edit manually grub.conf and eliminate the files from /boot?
Yum-utils includes a script called package-cleanup. Running "package-cleanup --oldkernels" will take care of this for you, without having to check kernel versions by hand.
Also, check this out: http://www.livejournal.com/users/katzj/375424.html