[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH v3 2/2] Add example of NeverAutoRemove::KernelCount in apt.conf.autoremove



Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
---
 debian/apt.conf.autoremove | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/apt.conf.autoremove b/debian/apt.conf.autoremove
index 10438e848..25a361e3d 100644
--- a/debian/apt.conf.autoremove
+++ b/debian/apt.conf.autoremove
@@ -8,6 +8,12 @@ APT
 	"^linux-image-[a-z0-9]*-[a-z0-9]*$";
   };
 
+  # Keep a custom amount of kernels when autoremoving. 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.
+  #NeverAutoRemove::KernelCount 2;
+
   VersionedKernelPackages
   {
 	# kernels
-- 
2.42.0.1140.gf01f4dc781


Reply to: