LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-06-2004, 05:13 PM   #1
buffed317
Member
 
Registered: Jun 2004
Location: New Jersey, USA
Distribution: Slackware 11
Posts: 191

Rep: Reputation: 31
removing kernels from grub


everytime i update the kernel through yum it adds another boot option to grub. how do i remove the different kernel options from grub?
 
Old 07-06-2004, 05:19 PM   #2
wiraone
Member
 
Registered: Nov 2003
Location: Diawang-awangan
Distribution: Ubuntu Hoary!
Posts: 319

Rep: Reputation: 30
do a 'rpm -qa | grep kernel' .. find the one that you need to remove and do
'rpm -e kernel-X.X.X-X.XXX' (where the Xs are the release number). This will remove the physical kernel of your system too and free up some space in your /boot directory and in /lib/modules too.
 
Old 07-06-2004, 05:49 PM   #3
buffed317
Member
 
Registered: Jun 2004
Location: New Jersey, USA
Distribution: Slackware 11
Posts: 191

Original Poster
Rep: Reputation: 31
the output of the rpm -qa | grep kernel and the out was:

kernel-source-2.6.5-1.358
kernel-utils-2.4-9.1.131
kernel-2.6.6-1.435
kernel-2.6.5-1.358
kernel-2.6.6-1.435.2.3

can i remove everything but kernel-2.6.6-1.435.2.3 or do i need the utils and source file?
 
Old 07-06-2004, 08:05 PM   #4
robert_edwards
LQ Newbie
 
Registered: Apr 2004
Posts: 27

Rep: Reputation: 15
vim /etc/grub.conf

(if I recall correctly..?..?)

just compare the numbers in the entries, and remove the entries with the lower kernel versions, but remember to compare them word for word so that you know where to start/stop editing.

A simple answer to a simple question, I hope.
 
Old 07-06-2004, 09:54 PM   #5
Basslord1124
Member
 
Registered: Jun 2004
Location: KY
Distribution: Debian, Mint, Puppy
Posts: 507

Rep: Reputation: 51
yeah, just go to grub's config file and delete the entries associated with old kernel's. Had to do it myself recently.
 
Old 07-06-2004, 10:12 PM   #6
flyfishin
Member
 
Registered: Aug 2003
Location: KC, MO
Distribution: CentOS, RHEL, SuSE, Fedora
Posts: 243

Rep: Reputation: 30
Quote:
Originally posted by buffed317
the output of the rpm -qa | grep kernel and the out was:

kernel-source-2.6.5-1.358
kernel-utils-2.4-9.1.131
kernel-2.6.6-1.435
kernel-2.6.5-1.358
kernel-2.6.6-1.435.2.3

can i remove everything but kernel-2.6.6-1.435.2.3 or do i need the utils and source file?
First figure out which kernel you are running. You should be running the highest numbered one. In your case 2.6.6-1.435.2.3. If all is well you can remove 2.6.5-1.358 and 2.6.6-1.435. You can also remove that specific kernel-source package because it is for an old kernel. After removing that kernel source be sure to get the kernel-source for your current kernel. If you have the disk space keep it installed. Do not remove kernel-utils. if you want to find information on a package issue the command:

rpm -qi nameofrpm
 
Old 07-07-2004, 01:49 AM   #7
wiraone
Member
 
Registered: Nov 2003
Location: Diawang-awangan
Distribution: Ubuntu Hoary!
Posts: 319

Rep: Reputation: 30
Removing the entries in /etc/grub.conf is a quick and dirty way of getting rid of the choices in the grub menu, but the physical kernel files will stay in the HD. Removing the unused kernel packages (using rpm -e) is the correct way to do.
 
Old 07-07-2004, 10:44 PM   #8
vincebs
Member
 
Registered: Oct 2003
Location: Mississauga, ON
Distribution: Ubuntu 9.04
Posts: 496

Rep: Reputation: 30
If you did not use an rpm to install your kernel, for example, if you compiled your own kernel, do the following:

1.) Remove the GRUB entry for the kernel (for example, kernel-2.6.7) in /boot/grub/menu.lst
2.) Delete the kernel files in the boot directory by typing: rm /boot/*2.6.7*
3.) Make sure /boot/vmlinuz and /boot/System.map are still symbolically linked to the files of an existing kernel.
4.) Delete the kernel's modules by deleting its folder in /lib/modules. For example, rm -drf 2.6.7
 
Old 07-08-2004, 09:55 AM   #9
gabigrigore
LQ Newbie
 
Registered: May 2003
Location: Iasi, Romania
Distribution: Linux Mint Julia
Posts: 19

Rep: Reputation: 0
if you have apt installed you can remove them from there. (I think, but I'm not sure, only if they were installed via rpm). I did this and everything was ok. Using Synaptic as a gui for apt will make the things even more easier. Hope that helped
 
  


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
Removing old kernels mike270 Linux - Software 6 08-07-2004 09:05 PM
Removing old kernels dbzw Linux - Newbie 5 02-29-2004 12:01 PM
Removing old kernels dbzw Linux - General 1 02-28-2004 11:33 PM
removing kernels? rakriege Linux - Newbie 1 11-09-2003 05:54 PM
removing old kernels in RH 8.0 bobterri Linux - General 2 12-02-2002 09:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:08 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration