On Sat, 14 Nov 2026 21:51:35 -0500
Greg Wooledge <[email protected]> wrote:

> > As near as I can figure this setting should give me three kernel
> > packages installed, instead of the default two. However, I now have
> > five on test machines.  
> 
> Are you running apt autoremove?
> 
> The setting you're looking at affects autoremove.  It doesn't
> *trigger* an autoremove.  You still need to run it yourself.

Now you have me mystified. If I don't set
APT::NeverAutoRemove::KernelCount then upgrades automatically install a
new kernel. (I have linux-image-amd64 installed.) They also remove an
old one, leaving me with the default net two kernels.

I don't think I have ever run "apt autoremove". I just did so on a
machine with five kernels installed; none were removed.

"man apt" says,

    autoremove is used to remove packages that were automatically
    installed to satisfy dependencies for other packages and are now no
    longer needed as dependencies changed or the package(s) needing
    them were removed in the meantime.

The current linux-image-amd64 depends on
linux-image-6.12.117+deb13-amd64. So if autoremove worked on kernels,
should it have removed all the kernels except
linux-image-6.12.117+deb13-amd64? Maybe it makes an exception for
kernels?

(And I am well aware of the dangers of believing the documentation
uncritically.)

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Reply via email to