LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-04-2003, 02:51 PM   #1
Jim Miller
Member
 
Registered: Sep 2001
Posts: 35

Rep: Reputation: 15
deleting old kernel versions


I've accumulated a few old versions of Linux kernels in my /boot directory as a result of kernel upgrades via the RedHat upgrade agent. I'm now out of room in that partition. What should I do to get rid of the old unused ones? If left to my own devices, I would:

* delete any files in /boot with numbers corresponding to unwanted versions, and

* update /sbin/lilo.conf to omit references to the now-deleted versions

but I'm a little nervous about monkeying around in the /boot partition. Any advice?

Thanks,
Jim
 
Old 02-04-2003, 03:29 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Unwanted kernel images

Based on my experience, which is admittedly somewhat limited, you should be able to just delete those kernel images. However, if you want to be careful about it, I'd do one of two things before deleting them outright:

1) Rename the "suspect" kernel images
2) Move the images to another directory in your filesystem

Then go and modify lilo.conf. Again, if you want to be extra careful, first comment-out lines before deleting them, and make sure you can still boot.

I use redHat 8, and there are also System.map files and initrd images linked with specific kernel versions. If you have those, you can get rid of them as well.
 
Old 02-04-2003, 03:59 PM   #3
Jim Miller
Member
 
Registered: Sep 2001
Posts: 35

Original Poster
Rep: Reputation: 15
Re: Unwanted kernel images

Thanks! I poked around a bit more, and found this: http://www.linuxquestions.org/questi...threadid=29807

Since kernel updates in RedHat are implemented as RPM packages, you can use RPM to uninstall unwanted ones:

rpm -qa | grep kernel

will show you all the kernel packages, and you can then use "rpm -e <name>" to remove the unwanted ones. This gets all the related files out of /boot and who knows where else, and even edits /etc/lilo.conf to remove the references.

Jim
 
Old 02-04-2003, 04:02 PM   #4
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Re: deleting old kernel versions

Quote:
Originally posted by Jim Miller
I've accumulated a few old versions of Linux kernels in my /boot directory as a result of kernel upgrades via the RedHat upgrade agent. I'm now out of room in that partition. What should I do to get rid of the old unused ones? If left to my own devices, I would:

* delete any files in /boot with numbers corresponding to unwanted versions, and

* update /sbin/lilo.conf to omit references to the now-deleted versions

but I'm a little nervous about monkeying around in the /boot partition. Any advice?

Thanks,
Jim
Definitely, if you can identify the old kernels. Also rm -rf /lib/modules/<old-version>/ if you want to clean up the corresponding kernel modules stored under the root partition. I'd keep one old version, so I can boot it if I mess up the running kernel and shoot myself in the foot.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel versions r.stiltskin Debian 1 10-23-2004 09:25 AM
How to keep modules/drivers across kernel recompiles and kernel versions? Pisces107 Linux - General 5 01-21-2004 08:29 PM
Kernel versions i286 Linux - General 3 01-11-2004 12:07 PM
deleting old versions iJasonT Linux - Newbie 11 03-28-2003 08:17 AM
Kernel Versions 0versight Linux - Newbie 5 01-16-2003 09:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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