how to get rid of old kernel?

This is a discussion about how to get rid of old kernel? in the Everything Linux category; hi i'm running red hat 9 and just compiled a new kernel. . . now I have two kernels I can boot from at GRUB boot loader, my new kernel works just fine, so my question is how do i get rid of the old kernel? i don't just want to remove it as a boot option from the grub.

Everything Linux 1800 This topic was started by , . Last reply by ,


data/avatar/default/avatar02.webp

12 Posts
Location -
Joined 2003-06-13
hi
 
i'm running red hat 9 and just compiled a new kernel...
 
now I have two kernels I can boot from at GRUB boot loader, my new kernel works just fine, so my question is how do i get rid of the old kernel? i don't just want to remove it as a boot option from the grub.conf file, so should i just delete the old kernel image from /boot?
 
thx in advance!

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Jun 20
Created
Jul 22
Last Response
0
Likes
2 minutes
Read Time
User User User User
Users

Responses to this topic


data/avatar/default/avatar24.webp

13 Posts
Location -
Joined 2003-05-03
What about removing the package of the old kernel using rpm ?

data/avatar/default/avatar06.webp

122 Posts
Location -
Joined 2001-10-22
Greeetings,
 
You can try with rpm -e k_defltXXX.rpm --nodeps ( same for it's source )
 
Otherwise
 
ls /usr/src/ and rm the old ones ( proceed with caution )
 
you need to make sure about modules as well , be cautious with the <M> during your kernel's configuration as well
 
Check /lib/modules ( caution with these )
 
As for the menu you can easily get rid of the options you dont need by reconfiguring your boot Loader,check /etc/sysconfig/ as well
 
Farewell

data/avatar/default/avatar02.webp

169 Posts
Location -
Joined 2003-03-02
Ghostsong has explained it perfectly
As far as /lib/modules goes this is the actual contents of my /lib/modules

Code:
bash-2.05b$ pwd/lib/modulesbash-2.05b$ ls2.4.21  2.5.75  2.6.0-test1bash-2.05b$
As you can see I have 3 kernels installed .
Simply deleat the kernel modules, of the kernel you no longer want.
for example
Code:
rm -Rf 2.5.75
You can do exactly the same in /usr/src

data/avatar/default/avatar40.webp

3 Posts
Location -
Joined 2003-07-22
Don't forget, if you're using a multi-boot system, to clean up your boot configs and re-run either LILO or Grub boot installers.
 
Mike