• APT::NeverAutoRemove::KernelCount "3"; Not quite working: I get more t

    From Charles Curley@3:633/10 to All on Sunday, November 15, 2026 01:10:01
    Subject: APT::NeverAutoRemove::KernelCount "3"; Not quite working: I get more than three kernels

    On trixie, with apt version "apt 3.0.4 (amd64)", the setting

    APT::NeverAutoRemove::KernelCount "3";

    isn't quite working: during automatic upgrades, I get more than three
    kernels.

    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.

    According to /usr/share/doc/apt/examples/configure-index,

    NeverAutoRemove::KernelCount "<INT>"; // Keep the configured amount
    of kernels

    "man apt.conf" says, in part,

    NeverAutoRemove::KernelCount
    Keep a custom amount of kernels when autoremoving and defaults
    to 2, meaning two kernels are kept. Apt will always keep the
    running kernel and the latest one. If the latest kernel is the
    same as the running kernel, the second latest kernel is kept.
    Because of this, any value lower than 2 will be ignored. If you
    want only the latest kernel, you should set
    APT::Protect-Kernels to false.

    Did I do something wrong or did I find a bug?

    --
    Does anybody read signatures any more?

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

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)