LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Remove back level Kernel (https://www.linuxquestions.org/questions/fedora-35/remove-back-level-kernel-295522/)

ibm1401 02-27-2005 12:23 PM

Remove back level Kernel
 
Like many using the Fedora distributions I have accumulated a bunch of back level kernels. It is most noticable when booting via grub. Is there a reasonably safe and easy way to remove back level kernel & modules? Another nice to have is something that would clean up the grub menu to shows only what you have?

Thanks in advance for any help.

Brian1 02-27-2005 12:37 PM

What to do is edit /boot/grub/grub.conf and remove each kernel section you don't what. Recommend to keep current and one old one (usually the default installed one ). Then /boot remove the vmlinuz, initrd, and system.map that match the kernels you removed from grub.conf. Now goto /lib/modules and remove match version number folders to kernel you selected earlier. That takes care of 99.99% of the items to gain back the space.

Brian1
" Google the Linux way @ http://www.google.com/linux "

ibm1401 02-27-2005 03:37 PM

Thanks Brian!

That does the trick.

Pudge 02-28-2005 03:19 PM

Quote:

Originally posted by Brian1
What to do is edit /boot/grub/grub.conf and remove each kernel section you don't what. Recommend to keep current and one old one (usually the default installed one ). Then /boot remove the vmlinuz, initrd, and system.map that match the kernels you removed from grub.conf. Now goto /lib/modules and remove match version number folders to kernel you selected earlier. That takes care of 99.99% of the items to gain back the space.

Brian1
" Google the Linux way @ http://www.google.com/linux "

You can do the same thing much easier with:
as the superuser,

Code:

    # rpm -q kernel
    kernel-2.6.10-1.760_FC3
    kernel-2.6.10-1.766_FC3
    #

That lists all versions of the kernel that are installed. To remove the older version kernel:

Code:

    # rpm  -e  kernel-2.6.10-1.760_FC3
    #

kernel-2.6.10-1.760_FC3 must be typed in exactly as it appears in the rpm -q listing. In fact, it is best to use copy/paste for the kernel version.

That will do everything (and possibly more) that Brian1 said to do in one easy step

Pudge

ibm1401 02-28-2005 04:32 PM

That works even better, I've six servers I've been taking care of and this will be safer.

Thanks!

Mike


All times are GMT -5. The time now is 07:08 PM.