Clean up old kernels in ubuntu - Ubuntu

This is a discussion on Clean up old kernels in ubuntu - Ubuntu ; Old kernels seem to be accumulating instead of being phased out. So right now on my laptop I have i linux-image-2.6.24-12-generic - Linux kernel image for version 2.6.24 on x i linux-image-2.6.24-15-generic - Linux kernel image for version 2.6.24 on ...

+ Reply to Thread
Page 1 of 5 1 2 3 ... LastLast
Results 1 to 20 of 83

Thread: Clean up old kernels in ubuntu

  1. Clean up old kernels in ubuntu

    Old kernels seem to be accumulating instead of being phased out. So
    right now on my laptop I have

    i linux-image-2.6.24-12-generic - Linux kernel image for version 2.6.24 on x
    i linux-image-2.6.24-15-generic - Linux kernel image for version 2.6.24 on x
    i linux-image-2.6.24-16-generic - Linux kernel image for version 2.6.24 on x
    i linux-image-2.6.24-17-generic - Linux kernel image for version 2.6.24 on x
    i A linux-image-2.6.24-18-generic - Linux kernel image for version 2.6.24 on x
    i A linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on x


    which is way too much. Is there some way to clean them up so that I
    have only a couple of latest ones (and maybe the first one).

    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  2. Re: Clean up old kernels in ubuntu

    On Tue, 17 Jun 2008 13:15:02 -0500, Ignoramus17809 wrote:

    > Old kernels seem to be accumulating instead of being phased out. So
    > right now on my laptop I have
    >
    > i linux-image-2.6.24-12-generic - Linux kernel image for version 2.6.24 on x
    > i linux-image-2.6.24-15-generic - Linux kernel image for version 2.6.24 on x
    > i linux-image-2.6.24-16-generic - Linux kernel image for version 2.6.24 on x
    > i linux-image-2.6.24-17-generic - Linux kernel image for version 2.6.24 on x
    > i A linux-image-2.6.24-18-generic - Linux kernel image for version 2.6.24 on x
    > i A linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on x
    >
    >
    > which is way too much. Is there some way to clean them up so that I
    > have only a couple of latest ones (and maybe the first one).


    You've never heard of the "rm" command?


    --
    "Ubuntu" -- an African word, meaning "Slackware is too hard for me".


  3. Re: Clean up old kernels in ubuntu

    On 2008-06-17, Dan C wrote:
    > On Tue, 17 Jun 2008 13:15:02 -0500, Ignoramus17809 wrote:
    >
    >> Old kernels seem to be accumulating instead of being phased out. So
    >> right now on my laptop I have
    >>
    >> i linux-image-2.6.24-12-generic - Linux kernel image for version 2.6.24 on x
    >> i linux-image-2.6.24-15-generic - Linux kernel image for version 2.6.24 on x
    >> i linux-image-2.6.24-16-generic - Linux kernel image for version 2.6.24 on x
    >> i linux-image-2.6.24-17-generic - Linux kernel image for version 2.6.24 on x
    >> i A linux-image-2.6.24-18-generic - Linux kernel image for version 2.6.24 on x
    >> i A linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on x
    >>
    >>
    >> which is way too much. Is there some way to clean them up so that I
    >> have only a couple of latest ones (and maybe the first one).

    >
    > You've never heard of the "rm" command?
    >


    I have heard about it.

    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  4. Re: Clean up old kernels in ubuntu

    On Tue, 17 Jun 2008 13:31:59 -0500, Ignoramus17809 wrote:

    > On 2008-06-17, Dan C wrote:
    >> On Tue, 17 Jun 2008 13:15:02 -0500, Ignoramus17809 wrote:
    >>
    >>> Old kernels seem to be accumulating instead of being phased out. So
    >>> right now on my laptop I have
    >>>
    >>> i linux-image-2.6.24-12-generic - Linux kernel image for version 2.6.24 on x
    >>> i linux-image-2.6.24-15-generic - Linux kernel image for version 2.6.24 on x
    >>> i linux-image-2.6.24-16-generic - Linux kernel image for version 2.6.24 on x
    >>> i linux-image-2.6.24-17-generic - Linux kernel image for version 2.6.24 on x
    >>> i A linux-image-2.6.24-18-generic - Linux kernel image for version 2.6.24 on x
    >>> i A linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on x
    >>>
    >>>
    >>> which is way too much. Is there some way to clean them up so that I
    >>> have only a couple of latest ones (and maybe the first one).

    >>
    >> You've never heard of the "rm" command?
    >>

    >
    > I have heard about it.


    OK, well that's a good clue for you to pursue.


    --
    "Bother!" said Pooh, as he poured grease onto the interstate.


  5. Re: Clean up old kernels in ubuntu

    On Tue, 17 Jun 2008 13:15:02 -0500, Ignoramus17809 wrote:

    > Old kernels seem to be accumulating instead of being phased out. So right
    > now on my laptop I have
    >
    > i linux-image-2.6.24-12-generic - Linux kernel image for version
    > 2.6.24 on x i linux-image-2.6.24-15-generic - Linux kernel image for
    > version 2.6.24 on x i linux-image-2.6.24-16-generic - Linux kernel
    > image for version 2.6.24 on x i linux-image-2.6.24-17-generic - Linux
    > kernel image for version 2.6.24 on x i A linux-image-2.6.24-18-generic -
    > Linux kernel image for version 2.6.24 on x i A
    > linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on
    > x
    >
    >
    > which is way too much. Is there some way to clean them up so that I have
    > only a couple of latest ones (and maybe the first one).


    Delete them and remove the listing from /boot/grub/menu.lst? If you don't
    need to free up space just remove the entries from menu.lst.



  6. Re: Clean up old kernels in ubuntu

    Ignoramus17809 schrieb:

    > Old kernels seem to be accumulating instead of being phased out. So
    > right now on my laptop I have
    >
    > i linux-image-2.6.24-12-generic - Linux kernel image for version
    > 2.6.24 on x
    > i linux-image-2.6.24-15-generic - Linux kernel image for version
    > 2.6.24 on x
    > i linux-image-2.6.24-16-generic - Linux kernel image for version
    > 2.6.24 on x
    > i linux-image-2.6.24-17-generic - Linux kernel image for version
    > 2.6.24 on x
    > i A linux-image-2.6.24-18-generic - Linux kernel image for version
    > 2.6.24 on x
    > i A linux-image-2.6.24-19-generic - Linux kernel image for version
    > 2.6.24 on x
    >
    >
    > which is way too much. Is there some way to clean them up so that I
    > have only a couple of latest ones (and maybe the first one).


    Hi there!

    The command
    sudo aptitude remove linux-image-2.6.24-12-generic

    will remove the package "linux-image-2.6.24-12-generic", for example.
    You can do that for each kernel-package or for sereral at once by just
    appending them to the commandline given above. See the man-page and
    aptitude --help for more details.

    *Ensure*, that you have at least one working kernel-image installed.
    It's always a good idea to have a rescue-cd in range, for the case that
    something goes very wrong!

    Good luck!
    Andreas

  7. Re: Clean up old kernels in ubuntu

    Meat Plow writes:

    > On Tue, 17 Jun 2008 13:15:02 -0500, Ignoramus17809 wrote:
    >
    >> Old kernels seem to be accumulating instead of being phased out. So right
    >> now on my laptop I have
    >>
    >> i linux-image-2.6.24-12-generic - Linux kernel image for version
    >> 2.6.24 on x i linux-image-2.6.24-15-generic - Linux kernel image for
    >> version 2.6.24 on x i linux-image-2.6.24-16-generic - Linux kernel
    >> image for version 2.6.24 on x i linux-image-2.6.24-17-generic - Linux
    >> kernel image for version 2.6.24 on x i A linux-image-2.6.24-18-generic -
    >> Linux kernel image for version 2.6.24 on x i A
    >> linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on
    >> x
    >>
    >>
    >> which is way too much. Is there some way to clean them up so that I have
    >> only a couple of latest ones (and maybe the first one).

    >
    > Delete them and remove the listing from /boot/grub/menu.lst? If you don't
    > need to free up space just remove the entries from menu.lst.
    >


    Does the grub config not have a "number to maintain" variable? That
    would be nice.

    --
    "Your Ref header shows bt.com. The "kustomkomputer" troll nymshifted again?"
    -- William Poaster boring people to death with his header compulsion in comp.os.linux.advocacy

  8. Re: Clean up old kernels in ubuntu

    On 2008-06-17, Meat Plow wrote:
    > On Tue, 17 Jun 2008 13:15:02 -0500, Ignoramus17809 wrote:
    >
    >> Old kernels seem to be accumulating instead of being phased out. So right
    >> now on my laptop I have
    >>
    >> i linux-image-2.6.24-12-generic - Linux kernel image for version
    >> 2.6.24 on x i linux-image-2.6.24-15-generic - Linux kernel image for
    >> version 2.6.24 on x i linux-image-2.6.24-16-generic - Linux kernel
    >> image for version 2.6.24 on x i linux-image-2.6.24-17-generic - Linux
    >> kernel image for version 2.6.24 on x i A linux-image-2.6.24-18-generic -
    >> Linux kernel image for version 2.6.24 on x i A
    >> linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on
    >> x
    >>
    >>
    >> which is way too much. Is there some way to clean them up so that I have
    >> only a couple of latest ones (and maybe the first one).

    >
    > Delete them and remove the listing from /boot/grub/menu.lst? If you don't
    > need to free up space just remove the entries from menu.lst.
    >
    >


    I was hoping that there is either a setting, or a tool, to do it
    automatically and safely.

    I want to both free up space as well as remove them from menu.lst.
    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  9. Re: Clean up old kernels in ubuntu

    On 2008-06-17, Andreas Wagner wrote:
    > Ignoramus17809 schrieb:
    >
    >> Old kernels seem to be accumulating instead of being phased out. So
    >> right now on my laptop I have
    >>
    >> i linux-image-2.6.24-12-generic - Linux kernel image for version
    >> 2.6.24 on x
    >> i linux-image-2.6.24-15-generic - Linux kernel image for version
    >> 2.6.24 on x
    >> i linux-image-2.6.24-16-generic - Linux kernel image for version
    >> 2.6.24 on x
    >> i linux-image-2.6.24-17-generic - Linux kernel image for version
    >> 2.6.24 on x
    >> i A linux-image-2.6.24-18-generic - Linux kernel image for version
    >> 2.6.24 on x
    >> i A linux-image-2.6.24-19-generic - Linux kernel image for version
    >> 2.6.24 on x
    >>
    >>
    >> which is way too much. Is there some way to clean them up so that I
    >> have only a couple of latest ones (and maybe the first one).

    >
    > Hi there!
    >
    > The command
    > sudo aptitude remove linux-image-2.6.24-12-generic
    >
    > will remove the package "linux-image-2.6.24-12-generic", for example.
    > You can do that for each kernel-package or for sereral at once by just
    > appending them to the commandline given above. See the man-page and
    > aptitude --help for more details.
    >
    > *Ensure*, that you have at least one working kernel-image installed.
    > It's always a good idea to have a rescue-cd in range, for the case that
    > something goes very wrong!
    >


    Yes, but... I want to do it automatically, when a new kernel is
    installed, all old ones up to the current ones should get deleted.

    I believe that Fedora does this.

    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  10. Re: Clean up old kernels in ubuntu

    On Tue, 17 Jun 2008 13:48:57 -0500, Ignoramus17809 wrote:

    > On 2008-06-17, Meat Plow wrote:
    >> On Tue, 17 Jun 2008 13:15:02 -0500, Ignoramus17809 wrote:
    >>
    >>> Old kernels seem to be accumulating instead of being phased out. So
    >>> right now on my laptop I have
    >>>
    >>> i linux-image-2.6.24-12-generic - Linux kernel image for version
    >>> 2.6.24 on x i linux-image-2.6.24-15-generic - Linux kernel image
    >>> for version 2.6.24 on x i linux-image-2.6.24-16-generic - Linux
    >>> kernel image for version 2.6.24 on x i linux-image-2.6.24-17-generic
    >>> - Linux kernel image for version 2.6.24 on x i A
    >>> linux-image-2.6.24-18-generic - Linux kernel image for version 2.6.24
    >>> on x i A linux-image-2.6.24-19-generic - Linux kernel image for
    >>> version 2.6.24 on x
    >>>
    >>>
    >>> which is way too much. Is there some way to clean them up so that I
    >>> have only a couple of latest ones (and maybe the first one).

    >>
    >> Delete them and remove the listing from /boot/grub/menu.lst? If you
    >> don't need to free up space just remove the entries from menu.lst.
    >>
    >>
    >>

    > I was hoping that there is either a setting, or a tool, to do it
    > automatically and safely.
    >
    > I want to both free up space as well as remove them from menu.lst.


    The menu list is easy and safe to edit, just make a backup copy. Read the
    list in Kate or your favorite gui editor and it will tell you how to edit
    it. The initrd and vmlinuz modules are all marked with the same build
    numbers. However they do not occupy much space at all maybe 50 megs for 4
    successive build updates. If you're scrimping for 50 megs you should
    upgrade your storage.


  11. Re: Clean up old kernels in ubuntu

    Ignoramus17809 wrote:
    > Old kernels seem to be accumulating instead of being phased out. So
    > right now on my laptop I have
    >
    > i linux-image-2.6.24-12-generic - Linux kernel image for version 2.6.24 on x
    > i linux-image-2.6.24-15-generic - Linux kernel image for version 2.6.24 on x
    > i linux-image-2.6.24-16-generic - Linux kernel image for version 2.6.24 on x
    > i linux-image-2.6.24-17-generic - Linux kernel image for version 2.6.24 on x
    > i A linux-image-2.6.24-18-generic - Linux kernel image for version 2.6.24 on x
    > i A linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on x
    >
    >
    > which is way too much. Is there some way to clean them up so that I
    > have only a couple of latest ones (and maybe the first one).
    >


    Delete them.

  12. Re: Clean up old kernels in ubuntu

    Ignoramus17809 wrote:
    > Yes, but... I want to do it automatically, when a new kernel is
    > installed, all old ones up to the current ones should get deleted.


    That would be dumb and dangerous. The Ubuntu developers are neither.

    Use synaptic/apt-get/aptitude when you want to delete old kernels. Once
    you're *sure* your new kernel works well, and you don't need/want any
    old kernels. Is this really all that difficult?

    --
    As we enjoy great advantages from inventions of others, we should be
    glad of an opportunity to serve others by any invention of ours;
    and this we should do freely and generously.
    --Benjamin Franklin

  13. Re: Clean up old kernels in ubuntu

    In alt.os.linux.debian on Tue, 17 Jun 2008 15:07:13 -0400, Meat Plow
    wrote:

    > The menu list is easy and safe to edit, just make a backup copy. Read the
    > list in Kate or your favorite gui editor and it will tell you how to edit
    > it.


    This will, however, need to be done as root. And the menu list will
    reappear whenever "update-grub" is run automatically, for example when
    a new kernel upgrade is available. Removing the packages with apt /
    aptitude / synaptic / adept is probably best.

    > The initrd and vmlinuz modules are all marked with the same build
    > numbers. However they do not occupy much space at all maybe 50 megs for 4
    > successive build updates. If you're scrimping for 50 megs you should
    > upgrade your storage.


    Some people use a small partition for /boot. In any case, keeping
    obsolete kernels, which have perhaps been updated because of security
    holes, may not be a good idea.


    --
    PJR :-)



  14. Re: Clean up old kernels in ubuntu

    Ignoramus17809 illuminated alt.os.linux.ubuntu by typing:

    >
    > Yes, but... I want to do it automatically, when a new kernel is
    > installed, all old ones up to the current ones should get deleted.
    >
    > I believe that Fedora does this.


    The reason Ubuntu *doesn't* do that is simple to understand.

    If you upgrade your kernel and it fails to boot, or if you upgrade
    your kernel and it's not compatible with one of your "must run"
    packages, then you can easily fall back to your previous image.

    I would not reccomend uninstalling all of them and would certainly
    advise you to leave two on there. It's very good insurance.

    --
    Moog

    “Are you going to come quietly, or do I have to use earplugs?”

  15. Re: Clean up old kernels in ubuntu

    Ignoramus17809 illuminated alt.os.linux.ubuntu by typing:
    > On 2008-06-17, Meat Plow wrote:
    >> On Tue, 17 Jun 2008 13:15:02 -0500, Ignoramus17809 wrote:
    >>
    >>> Old kernels seem to be accumulating instead of being phased out. So right
    >>> now on my laptop I have
    >>>
    >>> i linux-image-2.6.24-12-generic - Linux kernel image for version
    >>> 2.6.24 on x i linux-image-2.6.24-15-generic - Linux kernel image for
    >>> version 2.6.24 on x i linux-image-2.6.24-16-generic - Linux kernel
    >>> image for version 2.6.24 on x i linux-image-2.6.24-17-generic - Linux
    >>> kernel image for version 2.6.24 on x i A linux-image-2.6.24-18-generic -
    >>> Linux kernel image for version 2.6.24 on x i A
    >>> linux-image-2.6.24-19-generic - Linux kernel image for version 2.6.24 on
    >>> x
    >>>
    >>>
    >>> which is way too much. Is there some way to clean them up so that I have
    >>> only a couple of latest ones (and maybe the first one).

    >>
    >> Delete them and remove the listing from /boot/grub/menu.lst? If you don't
    >> need to free up space just remove the entries from menu.lst.
    >>
    >>

    >
    > I was hoping that there is either a setting, or a tool, to do it
    > automatically and safely.


    Synaptic.
    Search for & Completely remove the older kernels (I advise you leave the
    latest two though. - It will give you a way to boot should one kernel
    become corrupt or break one of your packages)

    > I want to both free up space as well as remove them from menu.lst.


    You can install the Startup Manager from Syanptic or open a terminal
    and type

    $ sudo apt-get install startupmanager

    The entry will appear (in Ubuntu) in System -> Administration -> Start
    Up Manager.

    --
    Moog

    “Are you going to come quietly, or do I have to use earplugs?”

  16. Re: Clean up old kernels in ubuntu

    On 2008-06-17, Moog wrote:
    > Ignoramus17809 illuminated alt.os.linux.ubuntu by typing:
    >
    >>
    >> Yes, but... I want to do it automatically, when a new kernel is
    >> installed, all old ones up to the current ones should get deleted.
    >>
    >> I believe that Fedora does this.

    >
    > The reason Ubuntu *doesn't* do that is simple to understand.
    >
    > If you upgrade your kernel and it fails to boot, or if you upgrade
    > your kernel and it's not compatible with one of your "must run"
    > packages, then you can easily fall back to your previous image.
    >
    > I would not reccomend uninstalling all of them and would certainly
    > advise you to leave two on there. It's very good insurance.
    >


    What Fedora does, to be clear, is when a new kernel is installed, it
    keeps the one that is "running right now", and also the new one, and
    deletes ones before that.

    Which is a safe and prudent approach. My memory of Fedora is fading at
    this point, so I may be mistaken, but that is my recollection.

    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  17. Re: Clean up old kernels in ubuntu

    Ignoramus17809 illuminated alt.os.linux.ubuntu by typing:
    > On 2008-06-17, Moog wrote:
    >> Ignoramus17809 illuminated alt.os.linux.ubuntu by typing:
    >>
    >>>
    >>> Yes, but... I want to do it automatically, when a new kernel is
    >>> installed, all old ones up to the current ones should get deleted.
    >>>
    >>> I believe that Fedora does this.

    >>
    >> The reason Ubuntu *doesn't* do that is simple to understand.
    >>
    >> If you upgrade your kernel and it fails to boot, or if you upgrade
    >> your kernel and it's not compatible with one of your "must run"
    >> packages, then you can easily fall back to your previous image.
    >>
    >> I would not reccomend uninstalling all of them and would certainly
    >> advise you to leave two on there. It's very good insurance.
    >>

    >
    > What Fedora does, to be clear, is when a new kernel is installed, it
    > keeps the one that is "running right now", and also the new one, and
    > deletes ones before that.
    >
    > Which is a safe and prudent approach. My memory of Fedora is fading at
    > this point, so I may be mistaken, but that is my recollection.


    My memory of Fedora is pretty good. In fact, I dislike it so much I
    prefer to run CentOS.

    Whether Fedora does something with an image or not does not mean that
    this should be replicated in every other distro.

    The tools are there to do what you require. Simply use them. You can
    make a decision to remove all of themif you want. I would, as
    previously suggested, keep at *least* two.

    --
    Moog

    “Are you going to come quietly, or do I have to use earplugs?”

  18. Re: Clean up old kernels in ubuntu

    On Tue, 17 Jun 2008 19:31:04 +0000, Moog wrote:

    > You can install the Startup Manager from Syanptic or open a terminal and
    > type
    >
    > $ sudo apt-get install startupmanager
    >
    > The entry will appear (in Ubuntu) in System -> Administration -> Start
    > Up Manager.



    Thanks for the tip (even though it wasn't for me specifically)...went
    ahead and installed it. Especially like the splash screen/bootup text
    with variable screen resolutions....it was a bit easier to read what was
    happening.....except for the bit I was really intrest in seeing....yep,
    gone in blink of an eye. LOL!

    Thanks again. :-)


  19. Re: Clean up old kernels in ubuntu

    propman illuminated alt.os.linux.ubuntu by typing:
    > On Tue, 17 Jun 2008 19:31:04 +0000, Moog wrote:
    >
    >> You can install the Startup Manager from Syanptic or open a terminal and
    >> type
    >>
    >> $ sudo apt-get install startupmanager
    >>
    >> The entry will appear (in Ubuntu) in System -> Administration -> Start
    >> Up Manager.

    >
    >
    > Thanks for the tip (even though it wasn't for me specifically)...went
    > ahead and installed it. Especially like the splash screen/bootup text
    > with variable screen resolutions....it was a bit easier to read what was
    > happening.....except for the bit I was really intrest in seeing....yep,
    > gone in blink of an eye. LOL!
    >
    > Thanks again. :-)


    No problem. It beats the hell out of b0rking the klack out of your menu.list
    using nano from within single user mode. ;-)

    --
    Moog

    “Are you going to come quietly, or do I have to use earplugs?”

  20. Re: Clean up old kernels in ubuntu

    On Tue, 17 Jun 2008 19:36:30 +0000, Moog wrote:

    > The tools are there to do what you require. Simply use them. You can
    > make a decision to remove all of themif you want. I would, as
    > previously suggested, keep at *least* two.


    I got all mine, just commented out the older ones in menu.lst to keep the
    boot screen sane. I think I need to collect a quite a few more old kernels
    before disk space becomes an issue :-)

    --
    Q: Want to lower petrol prices?
    A: Easy, just boycott BP & Esso



+ Reply to Thread
Page 1 of 5 1 2 3 ... LastLast