LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 08-22-2002, 03:23 PM   #1
BruceCadieux
Member
 
Registered: Apr 2002
Location: Wales MA.
Distribution: openSuSE 11.1
Posts: 409

Rep: Reputation: 32
Deleting old kernels?


I am running RedHat 7.3 and have updated my kernel to 2.4.18-10. Now I have the previous two kernels still sitting on my machine.

Is it safe to delete these older kernel directories, and if so what exactly would I need to delete and do to safely be rid of them?
 
Old 08-22-2002, 03:40 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
If your new kernel works perfectly for you and you have no need for the older kernels and you are using lio you can delete /usr/src/linux-older.versions
rm -r /usr/src/linux-older.version1 /usr/src/linux-older.version2 ...
rm -f /boot/vmlinuz-older.version1 ....
in lilo.conf you should remove the sections for old kernels
Code:
prompt
timeout=10
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-current
        label=linux
        root=/dev/hda8
        append="hdc=ide-scsi"
        read-only
        initrd=/boot/initrd-current.img

image=/boot/vmlinuz-old
        label=linux_old
        root=/dev/hda8
        append="hdc=ide-scsi"
        read-only
        initrd=/boot/initrd-old.img
so it'll look like
Code:
prompt
timeout=10
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-current
        label=linux
        root=/dev/hda8
        append="hdc=ide-scsi"
        read-only
        initrd=/boot/initrd-current.img
also get rid off if any /boot/initrd-old.version.img files /boot/System.map-old.version etc. And rerun lilo:
/sbin/lilo
Also /lib/modules/old.kernel.version can be removed as well

Last edited by neo77777; 08-22-2002 at 03:43 PM.
 
Old 08-22-2002, 05:19 PM   #3
BruceCadieux
Member
 
Registered: Apr 2002
Location: Wales MA.
Distribution: openSuSE 11.1
Posts: 409

Original Poster
Rep: Reputation: 32
Thank You very much neo.

The new kernel works fine, and your directions also worked fine, I am not using lilo, so I just edited my grub.conf to reflect the changes and all is good.

Thanks again.
 
Old 08-22-2002, 10:57 PM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
You're welcome
 
Old 09-24-2002, 07:56 AM   #5
nemec
LQ Newbie
 
Registered: Sep 2002
Distribution: Redhat
Posts: 1

Rep: Reputation: 0
rpm -e --test kernel-oldversion -vvv

check that there is no NOs

rpm -e kernel-oldversion

thats it. Run Lilo to play safe, I guess.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
2.6 kernels linuxhippy Slackware 2 08-30-2005 12:31 AM
10.1 - Kernels? Alan Lakin Slackware 3 02-09-2005 08:28 AM
Deleting 2.6 usercsr Slackware 13 05-20-2004 01:37 AM
Other Kernels Nic-MDKman Linux - General 6 02-07-2004 06:37 AM
RH 8 kernels and their relation to 'stock' kernels psweetma Linux - Distributions 1 03-29-2003 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:08 PM.

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