By default settings unattended-upgrade does not automatically remove kernel packages that become unused in conjunction with updating by other software
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Fix Released
|
High
|
Balint Reczey | ||
Xenial |
Fix Released
|
High
|
Unassigned | ||
Artful |
Won't Fix
|
High
|
Balint Reczey | ||
update-manager (Ubuntu) |
Fix Released
|
Undecided
|
Balint Reczey | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Artful |
Fix Released
|
Undecided
|
Balint Reczey |
Bug Description
[Impact]
* Update-manager and unattended-upgrades install many kernel packages during the lifetime of a release but does not remove them automatically leading to those packages filling disk space potentially completely filling /boot and making the system unable to install updates or even boot.
* Stable release users are impacted by this bug for years and their systems already collected many autoremovable unused kernel packages, thus they would benefit from backporting the fix greatly.
* The bug is fixed by removing autoremovable (not currently booted) kernel packages when running unattended-upgrades or update-manager. Update manager offers the kernel removals when there are other updates to be installed.
[Test Case]
Note: test either update-manager or unattended-
1. Install kernel packages to be removed, mark them auto-installed and run apt's kernel hook script to make apt consider them autoremovable and simulate apt autoremove to get list of autoremovable packages:
sudo apt install -y linux-image-
sudo apt-mark auto linux-image-
sudo /etc/kernel/
apt autoremove --simulate
2. (for update-manager; add something for it to update as update-manager will not show removable packages, if there is not something to update, right?) Downgrade a package to be upgraded:
sudo apt-get install -y --allow-downgrades ca-certificates
3. (update-manager). Run update-manager and observe that kernel packages are offered for removal in Details of updates.
sudo update-manager
4. (update-manager) Click on Install Now and observe that the kernel packages are removed.
2. (unattended-
sudo unattended-upgrade -v
[Regression Potential]
The change may cause update-manager or unattanded-upgrades to remove used kernel packages or fail to install other package updates.
[Other Info]
The unattended-upgrades fix is uploaded with many other fixes and those may cause regressions in other areas in unattended-
[Original bug text]
When using default settings for unattended-upgrade i.e.
Unattended-
# default "false"
Unattended-
# default "true"
in configuration file /etc/apt/
unattended-upgrade is unable to remove packages that become unused in conjunction with updating by other software such as update-manager or apt full-upgrade. This is because unattended-upgrade compares the list of unneeded packages before and after it upgrades packages to detect which packages are new unused ones.
Consequently, if user installs new kernels using e.g. update-manager, the excessive kernels will not be removed by unattended-upgrade, and eventually (small) /boot will become full.
Expected behavior: handle removing of unused packages differently at least until other package management software installed by default can handle removing of new unused packages.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: unattended-upgrades 0.90
ProcVersionSign
Uname: Linux 4.4.0-36-generic i686
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: i386
CurrentDesktop: XFCE
Date: Sat Sep 17 11:28:44 2016
InstallationDate: Installed on 2016-09-05 (11 days ago)
InstallationMedia: Mythbuntu 16.04.1 LTS "Xenial Xerus" - Release i386 (20160719)
PackageArchitec
SourcePackage: unattended-upgrades
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
summary: |
- Unable to remove packages that become unused in conjunction with - updating by other software + Unable to automatically remove packages that become unused in + conjunction with updating by other software |
Changed in unattended-upgrades (Ubuntu): | |
importance: | Undecided → High |
tags: | added: rls-z-incoming |
tags: |
added: rls-aa-incoming removed: rls-z-incoming |
tags: | removed: rls-aa-incoming |
Changed in unattended-upgrades (Ubuntu Artful): | |
assignee: | nobody → Steve Langasek (vorlon) |
assignee: | Steve Langasek (vorlon) → Canonical Foundations Team (canonical-foundations) |
Changed in unattended-upgrades (Ubuntu Artful): | |
assignee: | Canonical Foundations Team (canonical-foundations) → Balint Reczey (rbalint) |
summary: |
- Unable to automatically remove packages that become unused in - conjunction with updating by other software + By default settings unattended-upgrade is unable to automatically remove + packages that become unused in conjunction with updating by other + software. |
description: | updated |
description: | updated |
Changed in unattended-upgrades (Ubuntu Artful): | |
status: | Opinion → New |
tags: | added: full-boot |
tags: | added: id-597a833ca49ff66291d34705 |
Changed in gnome-software (Ubuntu Artful): | |
status: | New → Invalid |
summary: |
- By default settings unattended-upgrade is unable to automatically remove + By default settings unattended-upgrade does not automatically remove packages that become unused in conjunction with updating by other - software. + software |
Changed in unattended-upgrades (Ubuntu): | |
status: | New → Confirmed |
Changed in unattended-upgrades (Ubuntu Artful): | |
status: | New → Confirmed |
Changed in unattended-upgrades (Ubuntu): | |
status: | Confirmed → Opinion |
Changed in unattended-upgrades (Ubuntu Artful): | |
status: | Confirmed → Opinion |
Changed in update-manager (Ubuntu): | |
assignee: | nobody → Balint Reczey (rbalint) |
Changed in update-manager (Ubuntu Artful): | |
assignee: | nobody → Balint Reczey (rbalint) |
Changed in update-manager (Ubuntu): | |
status: | New → In Progress |
Changed in update-manager (Ubuntu Artful): | |
status: | New → Confirmed |
status: | Confirmed → In Progress |
Changed in unattended-upgrades (Ubuntu): | |
status: | Opinion → In Progress |
Changed in unattended-upgrades (Ubuntu Artful): | |
status: | Opinion → In Progress |
tags: | added: id-59653842b438d4859259928d |
Changed in unattended-upgrades (Ubuntu): | |
status: | In Progress → Fix Committed |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done-xenial removed: verification-failed-xenial |
Changed in unattended-upgrades (Ubuntu Artful): | |
status: | In Progress → Won't Fix |
no longer affects: | gnome-software (Ubuntu Artful) |
no longer affects: | gnome-software (Ubuntu) |
Changed in unattended-upgrades (Ubuntu Xenial): | |
importance: | Undecided → High |
no longer affects: | apt (Ubuntu Artful) |
no longer affects: | apt (Ubuntu) |
summary: |
By default settings unattended-upgrade does not automatically remove - packages that become unused in conjunction with updating by other + kernel packages that become unused in conjunction with updating by other software |
description: | updated |
Can you please talk us through exactly how to reproduce the issue?
I have used u-u with a wide variety of other apt frontends in 16.04 without seeing that problem yet.