Public bug reported:

I use unattended-upgrades to install new kernels (I think probably from
the security pocket). I believe this is the default. I also don't run
autoremove automatically, which I believe is also the default.

I just recovered a system that had been stuck in a disk full state for a
while without me noticing because, without an automated autoremove,
unattended-upgrades had filled my system full of kernels.

Expected: "apt-get --purge autoremove" will remove all unused kernels,
perhaps with a bit of coaxing from me to provide enough free space for
dpkg and apt to function.

Actual: "apt-get --purge autoremove" left many extra kernels installed.

It seems that the reason is that apt considered most of the
automatically installed kernels as being marked for manual install. I
suspect that this is because apt wasn't able to mark kernels as
automatically installed because it didn't have enough space to do so at
the time, and without such a mark, it assumes manual.

Workaround: use "apt-mark" to mark all kernels as automatic once enough
space is available. Then run "/etc/kernel/postinst.d/apt-auto-removal"
manually. Then "apt-get --purge autoremove" works.

I'm not sure how we might approach fixing this. But I think it's a poor
UX that Ubuntu currently relies on autoremove to remove old kernels to
prevent the disk filling up, but this fails to work in some cases when
the disk does fill up.

I'm tagging such bugs "kernel-autoremove" to help us identify what needs
fixing to make kernel autoremovals work completely to fix this UX issue.

** Affects: apt (Ubuntu)
     Importance: High
         Status: New


** Tags: kernel-autoremove

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1723562

Title:
  Kernels get stuck in "manual" state and fail to autoremove after disk
  full condition

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1723562/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to