LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 02-27-2005, 12:23 PM   #1
ibm1401
LQ Newbie
 
Registered: Feb 2005
Posts: 3

Rep: Reputation: 0
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.
 
Old 02-27-2005, 12:37 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
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 "
 
Old 02-27-2005, 03:37 PM   #3
ibm1401
LQ Newbie
 
Registered: Feb 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks Brian!

That does the trick.
 
Old 02-28-2005, 03:19 PM   #4
Pudge
Member
 
Registered: Mar 2004
Distribution: Fedora Core 3, Arch Linux 0.7
Posts: 57

Rep: Reputation: 15
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

Last edited by Pudge; 02-28-2005 at 03:24 PM.
 
Old 02-28-2005, 04:32 PM   #5
ibm1401
LQ Newbie
 
Registered: Feb 2005
Posts: 3

Original Poster
Rep: Reputation: 0
That works even better, I've six servers I've been taking care of and this will be safer.

Thanks!

Mike
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help for kernel level project op4_u Linux - Software 2 09-29-2004 02:50 AM
how to remove dual boot and get back my partition ? netkepala Linux - Software 1 09-30-2003 11:20 AM
handling packets at kernel level using C/C++ valib4u Linux - Networking 3 09-14-2003 02:29 PM
routing at kernel level ramu_ak Linux - Networking 0 08-17-2003 07:40 AM
Howto: remove lilo & put win2k boot loader back? hugodog Linux - General 2 05-10-2002 12:45 PM


All times are GMT -5. The time now is 12:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration