> -----Ursprüngliche Nachricht----- > Von: Julian Andres Klode [mailto:[email protected]] Im Auftrag von Julian > Andres Klode > Gesendet: Dienstag, 23. März 2021 11:55 > An: Schulz, Reiner <[email protected]>; [email protected] > Betreff: Re: Bug#985771: apt-auto-removal isn't run by kernel update > > On Tue, Mar 23, 2021 at 10:18:34AM +0100, Reiner Schulz wrote: > > Package: apt > > Version: 1.8.2.2 > > Severity: normal > > > > Dear Maintainer, > > > > On 5 of our Debian 10 Server the separate /boot Partition filled up with old > kernels > > on a few Server without separate /boot partition are up to 10 old kernel > > left > > > > I check if linux-image\* was marked "manual", there where a few on some > Server, but not on all. > > > > /etc/kernel/postinst.d/apt-auto-removal should remove all old kernels but > > the > last two > > No... it creates a config file telling apt which kernels to remove
[RS] yes, correct, i describe it in a very short way > _when you run autoremove_. > > apt 2.2 automatically removes kernels during apt dist-upgrade / apt > full-upgrade (not using apt-get). > > Did you run autoremove? [RS] Do i have to run autoremove regulary? To remove old kernels? > > I greped over 23 Debian 10 Server: > > ansible DEBIAN_10 -b -m shell -a 'zgrep 'postinst.d' /var/log/apt/term.log* > > ' > >> grep_term.log 2>&1 > > > > grep -c -E 'zz-update-grub' grep_term.log > > 115 > > grep -c -E 'initramfs-tools' grep_term.log > > 138 > > grep -c -E 'apt-auto-removal' grep_term.log > > 2 > > > > i will attach grep_term.log > > I'm not sure what this is supposed to tell us, the hook is (usually) > silent, so it's not going to appear in the terminal output. [RS] if a new kernel is to setting up, the scripts from /etc/kernel/postinst.d/ are noted: Setting up linux-image-4.19.0-14-amd64 (4.19.171-2) ... ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-4.19.0-14-amd64 ... /etc/kernel/postinst.d/zz-update-grub: Generating grub configuration file ... So i expected to see there a note for /etc/kernel/postinst.d/apt-auto-removal > > /etc/kernel/postinst.d/apt-auto-removal isn't run after kernel updates > > I don't believe that. [RS] i believe you that. I only want to find my mistake, as i deployed all this servers

