apt-get autoremove takes forever
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-
Description: Ubuntu 16.04 LTS
Release: 16.04
david@david-
Linux david-linux 4.5.0-040500-
Status changed to 'Confirmed' because the bug affects multiple users.