LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-31-2008, 07:09 AM   #1
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,563
Blog Entries: 1

Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
removing old kernels


Is there any automated procedure to remove old kernels or do I just need to delete the relevant files manually? The files in question are as follows:

1. relevant files in /boot
2. relevant directories in /lib/modules
3. relevant entries of grub's menu.lst

Anything else?

thanks
 
Old 12-31-2008, 07:30 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
most package management systems tend to keep TWO kernels installed at once, in case an upgrade of one dies a death and such like. if you install a third, the first will often be removed automatically, along with all files and grub entries. if you want to explicitly remove one, just uninstall the relevant deb / rpm however you see fit.
 
Old 12-31-2008, 08:02 AM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,563
Blog Entries: 1

Original Poster
Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
Now I'm talking about F9 which was then upgraded to F10 alpha/beta and eventually F10.
Although there are indeed only three last kernels installed, there are a lot of directories in /lib/modules:
Code:
2.6.25.10-86.fc9.i686            2.6.27-0.398.rc9.fc10.i686  2.6.27-3.fc10.i686         2.6.27.5-117.fc10.i686
2.6.25.11-97.fc9.i686            2.6.27-1.fc10.i686          2.6.27.4-47.rc3.fc10.i686  2.6.27.5-94.fc10.i686
2.6.25.14-108.fc9.i686           2.6.27.2-23.rc1.fc10.i686   2.6.27.4-58.fc10.i686      2.6.27.7-134.fc10.i686
2.6.27-0.372.rc8.fc10.i686       2.6.27.3-27.rc1.fc10.i686   2.6.27.4-68.fc10.i686      2.6.27.9-159.fc10.i686
2.6.27-0.377.rc8.git1.fc10.i686  2.6.27.3-39.fc10.i686       2.6.27.4-79.fc10.i686
2.6.27-0.382.rc8.git4.fc10.i686  2.6.27.3-44.fc10.i686       2.6.27.5-109.fc10.i686

Why weren't they removed in the same way as the kernel .rpm packages? I assume I can safely delete the unnecessary directories.
 
Old 12-31-2008, 08:47 AM   #4
drchuck
Member
 
Registered: May 2007
Posts: 61

Rep: Reputation: 17
If you compiled or otherwise added kernel modules after upgrading the kernel, the package manager will leave those changes in place even after it deletes everything in the original kernel package. For example, the nvidia driver, vmware driver, etc, may have been added after the fact.
Code:
du -hs /lib/modules/*
will show the size of each directory, and you will find that most of them are small. You can safely delete the old unused directories, if you are careful not to delete the current ones.
 
Old 12-31-2008, 08:54 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,563
Blog Entries: 1

Original Poster
Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
thanks, that's exactly what it was: nvidia and vmware
 
  


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 carlosinfl Debian 7 03-03-2006 12:10 PM
Removing old kernels? carlosinfl Fedora 1 04-12-2005 09:58 AM
Re: Removing old kernels jong357 Linux - General 1 02-29-2004 07:54 AM
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


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