The Safest Way To Remove Old Kernels In Ubuntu

Remove Old Kernels In Ubuntu

2 Responses

  1. Fred Haab says:

    Not really working for me.

    [email protected]:/boot# purge-old-kernels
    No kernels are eligible for removal

    [email protected]:/boot# ls -1 /boot
    abi-4.4.0-93-generic
    abi-4.4.0-96-generic
    config-4.4.0-93-generic
    config-4.4.0-96-generic
    grub
    initrd.img-4.4.0-59-generic
    initrd.img-4.4.0-64-generic
    initrd.img-4.4.0-66-generic
    initrd.img-4.4.0-70-generic
    initrd.img-4.4.0-71-generic
    initrd.img-4.4.0-72-generic
    initrd.img-4.4.0-75-generic
    initrd.img-4.4.0-78-generic
    initrd.img-4.4.0-87-generic
    initrd.img-4.4.0-93-generic
    initrd.img-4.4.0-96-generic
    lost+found
    System.map-4.4.0-93-generic
    System.map-4.4.0-96-generic
    vmlinuz-4.4.0-93-generic
    vmlinuz-4.4.0-96-generic

    So the initrd.img files are not getting cleaned, and it’s causing my boot device to be 95+% full. I need to manually delete old ones to update, and I always only use apt-get upgrade, which should clean itself up. Ubuntu 16.04.

  2. cis says:

    Yes but sometimes you might want to keep an older kernel, not within the last 3 or 4.
    Hate to have to do this manually, as I have over 30 kernels installed… and it wasn’t my idea!
    Not sure how it happened, as I never even update my system to avoid this issue and /boot being full
    (which it now is, of course)

    Now that ubuntu-tweak is no longer being maintained, is there a good alternative that lets you choose the kernels to keep or delete?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.