Still, it might make more sense to run the scripts in /etc/kernel/postrm.d and program the exceptions for linux-image-extra there. For example, check in /etc/kernel/postrm.d/zz-update-grub if we are removing a linux-image-extra package, and only update grub, if not, right? And in /etc/kernel/postrm.d/initramfs-tools create initrd.img instead of removing it, if removing a linux-image-extra package.
Still, it might make more sense to run the scripts in /etc/kernel/ postrm. d and program the exceptions for linux-image-extra there. For example, check in /etc/kernel/ postrm. d/zz-update- grub if we are removing a linux-image-extra package, and only update grub, if not, right? And in /etc/kernel/ postrm. d/initramfs- tools create initrd.img instead of removing it, if removing a linux-image-extra package.