Public bug reported: 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 ** Affects: grub2 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1603751 Title: apt-get autoremove takes forever To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1603751/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs