apt-get autoremove takes forever

Bug #1603751 reported by glasairman
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

While trying to clear out old kernels in a UEFI system (8 or 9 surplus generations), I noticed that the apt-get autoremove command issues an update-grub command internally and rebuilds after >>EVERY<< generation deletion. This results in multiple rebuilds of the Grub configurations, including even those older generations that are subsequently going to be removed in a later pass.

While appreciating that there is a necessity for fallback at all times, is there not a more elegant and time saving way of doing this, maybe adding a parameter as eg. "apt-get autoremove min_generations=x" where there is specified parameter for minimum number of old kernels are kept (suggested minimum default current +2 back levels) and the rest deleted? This could enable a one pass autoremove, useful when new kernel versions are coming out every 5 minutes.

Grub2 version 2.02~beta2-36

david@david-linux:~$ lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04

david@david-linux:~$ uname -a
Linux david-linux 4.5.0-040500-generic #201603140130 SMP Mon Mar 14 05:32:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Thelasko (stever530) wrote :

I don't know if this is a Grub2 bug or an APT bug.

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.