Distro-provided mechanism to clean up old kernels

Vincent Ladeuil vila+udd at canonical.com
Fri Feb 17 07:29:08 UTC 2012


>>>>> Martin Pitt <martin.pitt at ubuntu.com> writes:

<snip/>

    > I think it'd be best if update-manager would auto-remove all kernel
    > packages except the most recent two or three during dist-upgrade. This
    > needs to be specified carefully of course, as people might explicitly
    > run a kernel from the previous distro release. So perhaps some
    > clevernes like if you install linux-image-3.2.0-N-generic, delete all
    > kernels up to linux-image-3.2.0-(N-2)-generic. 

My own use case here is that I had to work around a bug in newer kernels
by running a very old one for *months*, I don't have the precise number
anymore but I think I had at least 5 or 6 kernels newer than the only
one I could use.

Is there a way to know the last time a kernel was booted and use that as
a criteria to keep it ?

This will allow removing kernels unused for months limiting the risks
that we remove a vital one.

  Vincent




More information about the ubuntu-server mailing list