Clean out old kernels

Leonard Chatagnier lenc5570 at sbcglobal.net
Thu Oct 4 04:44:35 UTC 2007


--- NoOp <glgxg at sbcglobal.net> wrote:

> I've seen it before, googled for it, but just can't
> find it tonight...
> What is the easiest & safest way to clean out old
> kernels?
> 
> On one of my systems that I've just upgraded to
> Gutsy my grub menu looks
> like an archive of Ubuntu kernels. I know that I can
> just edit those out
> from menu.lst, but I'd also like to safely remove
> the old unused kernels
> as well. The grub list looks like this:
> 
> 2.6.22.-12-386
> 2.6.22.-12-386 recovery mode
> 2.6.22.-12-generic
> 2.6.22.-12-generic recovery mode
> 2.6.20-16-386
> 2.6.20-16-386 recovery mode
> 2.6.20-16-386-generic
> 2.6.20-16-386-generic  recovery mode
> 2.6.20-15-386-generic
> 2.6.20-15-386-generic recovery mode
> 
> Suggestions/recommendations on what to keep and what
> to remove?
> 
> 
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
>
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 
I feel like I'm pushing my luck advising you since I
usually asking for help, but here goes.
I would simply remove the kernel-images you don't want
using apt-get, aptitude or whatever front end you
choose:
"aptitude remove(purge, I like)
linux-image-2.6.20-15-386-generic" or whatever the
name is.
Once you removed what you want, I think just running
"sudo grub-update" will take care of menu.list located
in /boot/grub/ and you shouldn't have to edit the
file.
If you use lilo(prob not)you may have to edit lilo but
it's been a while since I've used lilo.
Hey, I'm no expert but I've done this before and it
worked so I wouldn't be afraid to try.  If I'm all wet
on this then let the experts chime in. If grub update
leaves some residue of removed kernels, I'd just
remove the residue. As far as what to keep, don't
really have any idea but the oldest kernel-image I
have is a 2.6.20-15. The one I use is
2.6.20-16-lowlatency #2 SMP PREEMPT on a 2000 era Dell
Dimensions desktop. I keep one or two extra kernels
just in case one fails.
HIH.
Len


Leonard Chatagnier
lenc5570 at sbcglobal.net




More information about the ubuntu-users mailing list