Please consider enabling Unattended-Upgrade::Remove-Unused-Dependencies by default

Bug #1294195 reported by James Troup
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

When you install Ubuntu today with full disk encryption you end up
with a separate small /boot partition (approx 200Mb). It doesn't take
long for this to fill up with old kernels.

While we mark old kernels for auto-removal nothing (on the default
system) actually triggers removal of unused packages; a human needs to
invoke (or arrange to be invoked) 'apt-get autoremove'.

/etc/apt/apt.conf.d/50unattended-upgrades documents an
Unattended-Upgrade::Remove-Unused-Dependencies configuration option.
I'd suggest we consider enabling this option by default on new
installs.

Changed in apt (Ubuntu):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
status: New → Confirmed
Revision history for this message
Julian Andres Klode (juliank) wrote :

That's an unattended-upgrades thing. That package installs the configuration files and matinains the unattended-upgrade options.

affects: apt (Ubuntu) → unattended-upgrades (Ubuntu)
Changed in unattended-upgrades (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → Michael Vogt (mvo)
importance: Undecided → Medium
Revision history for this message
Stefan H. (stefan-h) wrote :

Not sure why this was marked as a duplicate of https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1267059 . They have nothing to do with each other from what I can tell.

Revision history for this message
Jarno Suni (jarnos) wrote :

I think the duplicate status is wrong. Bug #1357093 should be marked as duplicate of this, as this is an older report.

Revision history for this message
Jarno Suni (jarnos) wrote :

Note that old kernels may not be removed by apt-get autoremove due to bug #1492709 in Trusty at least.

Revision history for this message
Jarno Suni (jarnos) wrote :

Unattended-Upgrade::Remove-Unused-Dependencies may remove other packages than kernels and headers and such that do not have anything to do with (a separate) /boot partition getting full. I guess that is not harmful, but is it always wanted?

Revision history for this message
Jarno Suni (jarnos) wrote :
Revision history for this message
Jarno Suni (jarnos) wrote :

As an alternative, you could could remove old kernels automatically by running a specific script for that purpose e.g. during startup (as root). Such a script exists. It is called purge-old-kernels. With -y option it could be used for doing automatic removal as root. I made a fork of the script; the fork is available at https://github.com/jarnos/bikeshed/blob/patch-1/purge-old-kernels

Revision history for this message
Michael Vogt (mvo) wrote :

This is enabled now in xenial in unattended-upgrades 0.89.1+

Changed in unattended-upgrades (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Jarno Suni (jarnos) wrote :

Could it work like `apt-get autoremove --purge` so that no configuration files of the removed packages are left in the system?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.