Article View: linux.debian.user
Article #508APT::NeverAutoRemove::KernelCount "3"; Not quite working: I get more than three kernels
From: Charles Curley
Date: Sun, 15 Nov 2026 00:10
Date: Sun, 15 Nov 2026 00:10
34 lines
4081 bytes
4081 bytes
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/
Technical Details
Message-ID:
<NZvYJ-bW04-11@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Charles Curley <charlescurley@charlescurley.com> Newsgroups: linux.debian.user Subject: APT::NeverAutoRemove::KernelCount "3"; Not quite working: I get more than three kernels Date: Sun, 15 Nov 2026 01:10:01 +0100 Message-ID: <NZvYJ-bW04-11@gated-at.bofh.it> X-Original-To: Debian Users <debian-user@lists.debian.org> X-Mailbox-Line: From debian-user-request@lists.debian.org Sun Nov 15 00:01:59 2026 Old-Return-Path: <charlescurley@charlescurley.com> X-Amavis-Spam-Status: No, score=1.948 tagged_above=-10000 required=5.3 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_BL_SPAMCOP_NET=1.347, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_PSBL=2.7] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -3.5 X-Authority-Analysis: v=2.4 cv=Qrde3Uyd c=1 sm=1 tr=0 ts=6af8f669 a=NgvI/wQFGgfv1u5PwVnSLQ==:117 a=NgvI/wQFGgfv1u5PwVnSLQ==:17 a=kj9zAlcOel0A:10 a=zJRp6_cAMcgA:10 a=x5bAJOVjf1IA:10 a=UPwgjlzBAAAA:8 a=VifAVdDEEbk7xDPOV1UA:9 a=CjuIK1q_8ugA:10 a=IJG1HS28PhTFVN2WG8Av:22 a=77MlUavazzFiBdNJOaXW:22 Organization: occasionally X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Antiabuse: This header was added to track abuse, please include it with any abuse report X-Antiabuse: Primary Hostname - box5635.bluehost.com X-Antiabuse: Original Domain - lists.debian.org X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12] X-Antiabuse: Sender Address Domain - charlescurley.com X-Bwhitelist: no X-Source-IP: 97.245.236.164 X-Source-L: No X-Exim-ID: 1xSNgm-00000004DKq-0rR9 X-Source-Sender: 164.sub-97-245-236.myvzw.com (hawk.localdomain) [97.245.236.164]:49800 X-Source-Auth: charlescurley@charlescurley.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: Y2hhcmxpYTM7Y2hhcmxpYTM7Ym94NTYzNS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Cmae-Envelope: MS4xfIqsspB2TeVpvViMGyJ1Y3s8lNnDEcWQJ+OgPLA7X8WVSDF1v/N94vEaHqUBdQh8omUYnGSeJMhAsa5Ixn7dhUR4pmV613wA7wAKQLFH5Nb59g/M6Wms zrsvsHcHorDl+TC5yeNVQIc4pmSzfxL8Ur5LfdqqyyCSCW2jlDhjXvZO4yh4omzfvCtxfE1aqYyKwMd9cKgu2eANQ3Qqz0j3ifIfOqxomojAF2aF1DzJzh7i X-Mailing-List: <debian-user@lists.debian.org> archive/latest/832893 List-ID: <debian-user.lists.debian.org> List-URL: <https://lists.debian.org/debian-user/> List-Archive: https://lists.debian.org/msgid-search/20261114170142.1a7283e6@hawk.localdomain Approved: robomod@news.nic.it Lines: 34 Sender: robomod@news.nic.it X-Original-Date: Sat, 14 Nov 2026 17:01:42 -0700 X-Original-Message-ID: <20261114170142.1a7283e6@hawk.localdomain>