Results 1 to 6 of 6

Thread: Grub2 - Removing old Kernels

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Beans
    348
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Grub2 - Removing old Kernels

    I've just installed Grub2, everything seams fine but editing the menu.lst doesn't remove old kernels anymore. I tried editing the grub.cfg file, but when update-grub is run it just rebuilds the cfg file. I've tried looking on the Grub2 wiki but I couldn't find much. Any ideas?

  2. #2
    Join Date
    Aug 2005
    Beans
    71

    Re: Grub2 - Removing old Kernels

    http://www.pendrivelinux.com/how-to-...kernel-images/

    It's safe to run 'sudo update-grub' afterwards too.
    EDIT: Oh, it's grub2. Don't know if these apply.

  3. #3
    Join Date
    Apr 2006
    Beans
    348
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Grub2 - Removing old Kernels

    Ahh I'm such an idiot

    Removing linux-image-2.6.xx-xx-xxx from synaptic and then running sudo update-grub removes the old kernels. Cheers.

  4. #4
    Join Date
    Nov 2009
    Beans
    3

    Re: Grub2 - Removing old Kernels

    Quote Originally Posted by bacardiandwatermelon View Post
    Ahh I'm such an idiot

    Removing linux-image-2.6.xx-xx-xxx from synaptic and then running sudo update-grub removes the old kernels. Cheers.
    Works Great! AWESOME! Thanks

  5. #5
    Join Date
    Nov 2008
    Location
    NZ
    Beans
    10

    Re: Grub2 - Removing old Kernels

    Great! Very easy to do and better then just making it so they appear to not be there when they are.

  6. #6
    Join Date
    Nov 2009
    Beans
    1

    Re: Grub2 - Removing old Kernels

    Searched for an option to remove entries from the grub-menu and stumbled upon this thread. This pushed me in the right direction. Thanks for the help!

    I did this on my Ubuntu server, listing the kernels I've got installed by running
    Code:
    sudo aptitude search linux-image-2.6 | grep "i "
    Note the spaces after the i in grep i. This to list only the installed kernels.

    After getting to know which kernels are installed I purged all but the initial kernel from install-time of Ubuntu server 10.04, and the two latest ones.
    For me that would be
    Code:
    sudo aptitude purge linux-image-2.6.32-27-server
    sudo aptitude purge linux-image-2.6.32-28-server
    Last, to rebuild the grub-menu
    Code:
    sudo update-grub
    Hope this can help someone who use aptitude in a server-environment.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •