[Bug 1914278] Re: apt autoremove is not removing unused kernels
Erich Eickmeyer
1914278 at bugs.launchpad.net
Wed Feb 3 16:13:24 UTC 2021
TJ:
linux-image-5.4.0-40-generic/focal-updates,focal-security,now 5.4.0-40.44 amd64 [installed,automatic]
linux-image-5.4.0-40-lowlatency/focal-updates,focal-security,now 5.4.0-40.44 amd64 [installed,automatic]
linux-image-5.4.0-42-generic/focal-updates,focal-security,now 5.4.0-42.46 amd64 [installed,auto-removable]
linux-image-5.4.0-42-lowlatency/focal-updates,focal-security,now 5.4.0-42.46 amd64 [installed,auto-removable]
linux-image-5.4.0-65-generic/focal-updates,focal-security,now 5.4.0-65.73 amd64 [installed]
linux-image-5.4.0-65-lowlatency/focal-updates,focal-security,now 5.4.0-65.73 amd64 [installed]
linux-image-5.8.0-34-generic/focal-updates,focal-security,now 5.8.0-34.37~20.04.2 amd64 [installed,automatic]
linux-image-5.8.0-34-lowlatency/focal-updates,focal-security,now 5.8.0-34.37~20.04.2 amd64 [installed,automatic]
linux-image-5.8.0-41-generic/focal-updates,focal-security,now 5.8.0-41.46~20.04.1 amd64 [installed]
linux-image-5.8.0-41-lowlatency/focal-updates,focal-security,now 5.8.0-41.46~20.04.1 amd64 [installed]
linux-image-generic-hwe-20.04/focal-updates,focal-security,now 5.8.0.41.46~20.04.27 amd64 [installed,automatic]
linux-image-generic/focal-updates,focal-security,now 5.4.0.65.68 amd64 [installed,automatic]
linux-image-lowlatency-hwe-20.04/focal-updates,focal-security,now 5.8.0.41.46~20.04.27 amd64 [installed,automatic]
linux-image-lowlatency/focal-updates,focal-security,now 5.4.0.65.68 amd64 [installed,automatic]
Balint:
Result: https://paste.ubuntu.com/p/JVHZpFWBBT/
It appears as though apt and u-u are doing the job, but for some reason
the packages aren't getting marked as autoremovable when they're
upgraded? I had to manually mark these as autoremovable (apt-mark linux-
image-${version}-${generic|lowlatency} auto) to get u-u or apt to do
anything about it. If you look at the list above, even the 5.4.0-65 and
5.4.0-41 kernels are showing up as manually installed, which is not the
case (they were installed via their respective metapackages).
So, something is definitely not working as expected.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1914278
Title:
apt autoremove is not removing unused kernels
Status in apt package in Ubuntu:
Incomplete
Status in discover package in Ubuntu:
New
Status in packagekit package in Ubuntu:
New
Status in unattended-upgrades package in Ubuntu:
Incomplete
Bug description:
With the machines I help administer, we have been finding situations
where the /boot directory is filling-up beyond 3 kernels on LUKS
encrypted systems. apt autoremove is not removing old kernels as
expected.
This may also be an issue with unattended-upgrades since I found the
following line commented-out by default:
// Remove unused automatically installed kernel-related packages
// (kernel images, kernel headers and kernel version locked tools).
// Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
We have had a system with as many as 15 kernel packages installed as a
result of this not working as expected.
The majority of these machines are using Discover to do their package
upgrading, which uses PackageKit as its backend.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: apt 2.0.4
ProcVersionSignature: Ubuntu 5.8.0-41.46~20.04.1-generic 5.8.18
Uname: Linux 5.8.0-41-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.14
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Tue Feb 2 09:29:01 2021
InstallationDate: Installed on 2020-11-07 (87 days ago)
InstallationMedia: Kubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1914278/+subscriptions
More information about the foundations-bugs
mailing list