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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-31-2008, 07:09 AM
|
#1
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
|
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
|
|
|
12-31-2008, 07:30 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
12-31-2008, 08:02 AM
|
#3
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Original Poster
|
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.
|
|
|
12-31-2008, 08:47 AM
|
#4
|
Member
Registered: May 2007
Posts: 61
Rep:
|
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.
|
|
|
12-31-2008, 08:54 AM
|
#5
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Original Poster
|
thanks, that's exactly what it was: nvidia and vmware
|
|
|
All times are GMT -5. The time now is 01:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|