From a6e30cc02eb24d5b2bbf2cb1b59c48c62d09658f Mon Sep 17 00:00:00 2001 From: Wesley Schwengle Date: Tue, 23 Jan 2024 15:41:33 -0400 Subject: Configure the amount of kernels to keep This commit introduces the following configuration for keeping a configurable amount of kernels: APT::NeverAutoRemove::KernelCount The logic dictates that the running kernel and the latest kernel are not autoremoved. In case the running kernel is the latest kernel, the previous kernel is kept. Any count lower than two is therefore disregarded. This is in line with the previous behavior. The default is therefore similar to: APT::NeverAutoRemove::KernelCount 2; This will be ignored and we will still keep two: APT::NeverAutoRemove::KernelCount 1; This will keep 3 kernels (including the runnig, and most recent) APT::NeverAutoRemove::KernelCount 3; Signed-off-by: Wesley Schwengle --- doc/examples/configure-index | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 0d4dd31a5..f37b7696c 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -55,6 +55,7 @@ APT Build-Profiles ""; NeverAutoRemove ""; // list of package name regexes + NeverAutoRemove::KernelCount ""; // Keep the configured amount of kernels LastInstalledKernel ""; // last installed kernel version VersionedKernelPackages ""; // regular expressions to be protected from autoremoval (kernel uname will be appended) Protect-Kernels ""; // whether to protect installed kernels against autoremoval (default: true) -- cgit v1.2.3-70-g09d2