Aptitude does not want to autoremove Linux kernel, while apt wants
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
aptitude (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
From some update last year or so, apt has achived the tools to remove old Linux kernels via /etc/kernel/
For example, here I have an installation where 4.15.0-20 is safe for deinstallation, and generated by script above config agrees:
$ LANG=C apt --dry-run autoremove
NOTE: This is only a simulation!
apt needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-
linux-
linux-
0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded.
Remv linux-cloud-
Remv linux-cloud-
Remv linux-headers-
Remv linux-headers-
Remv linux-modules-
Remv linux-image-
Remv linux-modules-
Remv linux-tools-
Remv linux-tools-
but aptitude does not:
$ LANG=C aptitude --simulate safe-upgrade
The following packages will be REMOVED:
linux-
linux-
linux-
0 packages upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 178 MB will be freed.
Note: Using 'Simulate' mode.
Do you want to continue? [Y/n/?] y
Would download/
Removing modules-extra seems fine for it, though!
I have looked over all apt configs, there was no sign for me that aptitude was configured specificly to keep the images.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: aptitude 0.8.10-6ubuntu1
ProcVersionSign
Uname: Linux 4.15.0-21-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue May 22 19:48:48 2018
InstallationDate: Installed on 2017-03-05 (443 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
ProcEnviron:
TERM=tmux-256color
PATH=(custom, no user)
XDG_RUNTIME_
LANG=ru_RU.UTF-8
SHELL=/bin/bash
SourcePackage: aptitude
UpgradeStatus: Upgraded to bionic on 2018-05-03 (18 days ago)
Forgot one thing: if ask aptitude explicitly why linux-image-... is needed, it will reply that no reason for this package was found.