Comment 6 for bug 923876

Revision history for this message
Daniel Hartwig (wigs) wrote : Re: [Bug 923876] Re: FR: Limit and clean-up kernel images and headers automatically in LTS

APT has good reason to not autoremove kernels, why you want to break that?

You want *some* process to reap old kernels, ok, but that does not
mean that the core package manager should be that process. The
selection of which kernels to clean up is domain-specific. Determine
such a list external to apt and use apt-get remove (not autoremove) to
dispose.

At the very least, if you insist on using markauto + autoremove, do
not make this the default. Your external process should invoke apt
with a custom configuration where APT::NeverAutoRemove does not
contain the entries blocking the desired autoremoval. Use APT_CONFIG
envvar and/or apt-get -c.