LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Correct way to remove older, unneeded kernels? (https://www.linuxquestions.org/questions/fedora-35/correct-way-to-remove-older-unneeded-kernels-134682/)

wytiger 01-14-2004 07:32 AM

Correct way to remove older, unneeded kernels?
 
Since I started with Fedora, I have upgraded the kernel as the new ones came out. Now, when my system boots I see four different kernel options to choose from. As far as I can tell, the latest kernel I have is working just fine, so I have two questions to pose:

1. How long is "long enough" to determine that the new kernel is working just fine?

2. Once determining the new kernel is working, how do I safely and correctly remove the older ones?

wiraone 01-14-2004 02:30 PM

1. When you think that the older kernel is no longer needed, then its the time to remove it .. basically for me, that mean regularly using the new kernel for a couple of weeks before I decided to remove the older kernel.
2. If you're using rpm to install the new kernel, you can use rpm -e to remove it .. eg:
$ rpm -e kernel-2.4.22-1.2115.nptl

wytiger 01-14-2004 03:44 PM

Quote:

Originally posted by wiraone
2. If you're using rpm to install the new kernel, you can use rpm -e to remove it .. eg:
$ rpm -e kernel-2.4.22-1.2115.nptl

I used up2date to update it. I assume this is the same?

Also, will 'rpm -e'ing the kernel also remove the entry from grub?

wiraone 01-14-2004 06:17 PM

$ rpm -qa | grep kernel

The above command will list out all kernel RPMs installed and choose the one you want to remove ..

Grub entries should be removed by the RPM script, but I've no idea if it will do this .. haven't done this for quite a while ..

karlan 01-14-2004 06:19 PM

yes, seems to work very well too, most of the time you should still check over /boot/grub/grub.conf to check

btw about the trick wiraone told you:
if you didn't already know grep will look for words when a program pipes("|") its stout to it, works for commands like ls too

wytiger 01-15-2004 07:00 AM

wiraone, all your responses did the trick! Thanks!

I have yet to reboot though to see if they are gone from the boot loader yet. I will post here for others interested when I do. I will also follow up with results from karlan's suggestion as well.

FXRS 01-16-2004 04:30 AM

Don't you have to do a "rpm -e --nodeps 'name of kernel here' "? When I removed my old kernels I used the --nodeps command with it.

FX

wytiger 01-16-2004 09:36 PM

wiraone, karlan:
Removing the kernel did, in fact, remove it from grub as well, and a reboot now only shows my latest kernel. Thanks again!

Oh, and nope, didn't have to use --nodeps.


All times are GMT -5. The time now is 04:50 PM.