[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Debian-User] Removing /lib/modules/<linux-image-version> after linux-image removal


I have the following /etc/kernel-img.conf:

do_symlinks = no
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
postinst_hook = /usr/sbin/update-grub
postrm_hook = /usr/sbin/update-grub
#ramdisk = /usr/sbin/mkinitrd.yaird

So when removing a particular kernel image, I get the grub menu update
automatically.  However I was wondering if there's already a script
that instead could have called update-grub, and after could have
removed /lib/modules/<corresponding_kernel>.

So far I've been removing manually the modules library, but I guess I
could create a script that does it for me and include it in the
portrm_hook field, but then I should make sure update-grub is also
called from the same script, otherwise I'd keep having non present
kernels in the grub menu.  But before doing such thing, I was
wondering this was already accomplished, so that kind of an official
approach ca be taken, :).



Reply to: