Oh, this is the script that is used for updating grub in conjunction with kernel removal: /etc/kernel/postrm.d/zz-update-grub Anyway, OP meant regenerating the initrd, which is handled by initramfs-tools scripts.
Oh, this is the script that is used for updating grub in conjunction with kernel removal: /etc/kernel/ postrm. d/zz-update- grub
Anyway, OP meant regenerating the initrd, which is handled by initramfs-tools scripts.