apt: after reboot, still wants to keep 3 kernels when it should only keep 2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
The apt kernel autoremoval handling should by design keep at least 2 and at most 3 kernels on the system.
However, on my 17.10 system, I currently have 3 kernels marked for retention while the kernel I have booted is the newest of these. This means that I'm not able to upgrade to 18.04 without manual intervention, because I have a /boot that's sized just large enough to fit 3 kernels, not 4, apt autoremove won't remove any of the kernels.
The sequence here is that I was running 4.13.0-36-generic; I updated, which pulled 4.13.0-37-generic onto the system; I ran apt autoremove --purge, which removed any kernels older than -36- from the system; I did *not* reboot; I installed 4.13.0-38-generic (from artful-proposed); all three kernels present are now marked for retention. I rebooted, and all three kernels are still marked for retention.
If /etc/kernel/
$ last
vorlon tty2 :0 Tue Mar 20 11:14 still logged in
reboot system boot 4.13.0-38-generi Tue Mar 20 10:34 still running
vorlon tty2 :0 Tue Mar 6 23:12 - down (13+10:21)
reboot system boot 4.13.0-36-generi Tue Mar 6 23:10 - 10:33 (13+10:23)
wtmp begins Tue Mar 6 23:09:27 2018
$
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: apt 1.5.1
ProcVersionSign
Uname: Linux 4.13.0-38-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Mar 21 13:02:43 2018
InstallationDate: Installed on 2010-09-24 (2735 days ago)
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
SourcePackage: apt
UpgradeStatus: Upgraded to artful on 2018-03-21 (0 days ago)
Changed in apt (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Attached apt term.log shows the history:
- 36 is running
- 31 is purged
- 37 is installed
- 32 is purged
- 38 is installed
- 37 is *not* purged
- rebooted to 38
- 36 and 37 are still not purged