LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-02-2004, 09:39 AM   #1
jmoody
LQ Newbie
 
Registered: Mar 2004
Posts: 24

Rep: Reputation: 15
removing old kernel after yum updates


I'm running Fedora 2 on various systems. On the systems with special kernels I ignore automatic kernel updates, but otherwise I prefer to have everything updated through nightly 'yum' runs.

Once in a while the kernel is updated on the non-special computers and that leaves me with yet another boot option in the Grub selection window on those machines. Obviously I can just edit the config file to remove the outdated selections (and the related files in /boot), but is there a clean way to remove old kernels once I'm satisfied that the new kernel is OK?

For example, my current grub.conf lists 2.6.5-1.358, 2.6.6-1.427, 2.6.6-1.435.2.3 along with my windows boot reference. I'd like to free up the disk space for anything related only to the two old kernels.

On a related note, my /usr/src directory lists two subdirectories: 'redhat' and 'linux-2.6.5-1.358', which is the name of the original kernel. Yet 'yum update kernel-source' indicates there are no updates, no actions to take. Ditto with up2date. And I've confirmed there is nothing in the ignore list.

I *think* I have the latest everything, but I can only find sources for the original kernel, not the latest. So why don't I have a directory called '/usr/src/linux-2.6.6-1.435.2.3'?
 
Old 08-02-2004, 10:18 AM   #2
Biased turkey
Member
 
Registered: Jan 2002
Location: Canada
Distribution: redhat7.2
Posts: 169

Rep: Reputation: 30
I think all the kernels are in the /boot directory, so maybe you could delete the old ones in that partition.

About the Kernel source: The kernel and the source are in different packages, so I think updating the kernel does not automatically update the source. On the other hand if the original rpm kernel source was installed , "yum update" should normally update the source too.
Maybe someone has a better explaination.
 
Old 08-02-2004, 01:51 PM   #3
jmoody
LQ Newbie
 
Registered: Mar 2004
Posts: 24

Original Poster
Rep: Reputation: 15
Biased turkey sez: I think all the kernels are in the /boot directory, so maybe you could delete the old ones in that partition.

Sure, that's not the problem. I was wondering what else an update puts on the system. I know when you build a kernel and its modules you end up with a big directory in /lib/modules and each one is kernel specific. Aha! I just checked -- there are three subdirs on the order of 58 MB each, one for each kernel on my system.

Right now my guess is that rpm is the right tool to use.

rpm -ql kernel-<version> lists all of the files in /lib/module/<version> as well as those in /boot

and

rpm --erase kernel-<version> clobbers them all.

I just have to edit /boot/grub/grub.conf by hand to complete the process.

----

Biased turkey sez: About the Kernel source: The kernel and the source are in different packages, so I think updating the kernel does not automatically update the source. On the other hand if the original rpm kernel source was installed , "yum update" should normally update the source too.
Maybe someone has a better explaination.


Well I tried both "yum update kernel" and "yum update kernel-source". New/updated source directories never appear. yum.log never mentions anything about sources. Can anyone shed some light as to why new kernel sources do not appear when new kernels do?
 
Old 08-03-2004, 01:29 AM   #4
teet
LQ Newbie
 
Registered: Mar 2004
Location: Truman State University
Posts: 28

Rep: Reputation: 15
There's probably an easier way, but this is what I did.

Install a nifty little apt gui called synaptic (if you have apt-get installed just issue "apt-get install synaptic" at the command prompt).

Then run the program, and simply deselect the old kernels you want to remove and click apply (you can easily remove other packages this way as well).

-teet
 
Old 08-03-2004, 08:39 AM   #5
Biased turkey
Member
 
Registered: Jan 2002
Location: Canada
Distribution: redhat7.2
Posts: 169

Rep: Reputation: 30
I would avoid updating a distro using 2 differents ways yum and apt-get for instance. There might be some slight difference of the same RPM on the apt-get and yum repository.
I'm using yum ( after trying apt-get and up2date that gave me bad experiences ) so I'm still faced with the same problem as jmoody: I can't update my kernel source.
 
Old 08-03-2004, 08:58 AM   #6
Biased turkey
Member
 
Registered: Jan 2002
Location: Canada
Distribution: redhat7.2
Posts: 169

Rep: Reputation: 30
After Googling( yum kernel-source ), I found some interestink link:
http://www.redhat.com/archives/fedor.../msg04330.html
I'll have to dig more. Is it a yum bug ?
 
  


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
Yum updates on FC3_64 Phaethar Fedora 4 11-22-2005 02:56 PM
Local server yum updates phillik747 Linux - Newbie 2 04-27-2005 12:11 AM
YUM Updates jaschwar Linux - Newbie 3 03-01-2005 05:13 PM
yum updates pulisubs Linux - Newbie 2 12-20-2004 10:14 PM
Where does yum download updates to? fzx1 Linux - Newbie 2 04-10-2004 03:50 PM

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

All times are GMT -5. The time now is 05:48 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