Package: src:linux Version: 4.7.2-1 Severity: normal I have some 3rd party modules compiled and installed (which don't use DKMS).
When I try to uninstall the kernel package, I get Removing linux-image-4.7.0-1-amd64 (4.7.2-1) ... Purging configuration files for linux-image-4.7.0-1-amd64 (4.7.2-1) ... rmdir: failed to remove '/lib/modules/4.7.0-1-amd64': Directory not empty dpkg: error processing package linux-image-4.7.0-1-amd64 (--purge): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: linux-image-4.7.0-1-amd64 E: Sub-process /usr/bin/dpkg returned an error code (1) Please consider turning rmdir /lib/modules/$version in postrm into rmdir /lib/modules/$version || true I think the error messages is valuable, so one doesn't forget to clean up manually, so I'd prefer the above over --ignore-fail-non-empty. Regards, Michael -- Package-specific info: ** Version: Linux version 4.7.0-1-amd64 (debian-kernel@lists.debian.org) (gcc version 5.4.1 20160803 (Debian 5.4.1-1) ) #1 SMP Debian 4.7.2-1 (2016-08-28) -- System Information: Debian Release: stretch/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (200, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages linux-image-4.7.0-1-amd64 depends on: ii initramfs-tools [linux-initramfs-tool] 0.125 ii kmod 22-1.1 ii linux-base 4.4 Versions of packages linux-image-4.7.0-1-amd64 recommends: ii firmware-linux-free 3.4 ii irqbalance 1.1.0-2 Versions of packages linux-image-4.7.0-1-amd64 suggests: pn debian-kernel-handbook <none> ii grub-pc 2.02~beta2-36 pn linux-doc-4.7 <none> Versions of packages linux-image-4.7.0-1-amd64 is related to: ii firmware-amd-graphics 20160110-1 pn firmware-atheros <none> pn firmware-bnx2 <none> pn firmware-bnx2x <none> pn firmware-brcm80211 <none> pn firmware-cavium <none> pn firmware-intel-sound <none> pn firmware-intelwimax <none> pn firmware-ipw2x00 <none> pn firmware-ivtv <none> ii firmware-iwlwifi 20160110-1 pn firmware-libertas <none> ii firmware-linux-nonfree 20160110-1 ii firmware-misc-nonfree 20160110-1 pn firmware-myricom <none> pn firmware-netxen <none> pn firmware-qlogic <none> pn firmware-realtek <none> pn firmware-samsung <none> pn firmware-siano <none> pn firmware-ti-connectivity <none> pn xen-hypervisor <none> -- no debconf information