Public bug reported: #sudo aptitude purge linux-ubuntu-modules-2.6.22-6-generic Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Building tag database... Done The following packages will be REMOVED: linux-ubuntu-modules-2.6.22-6-generic{p} 0 packages upgraded, 0 newly installed, 1 to remove and 2 not upgraded. Need to get 0B of archives. After unpacking 0B will be used. Do you want to continue? [Y/n/?] Writing extended state information... Done (Reading database ... 213814 files and directories currently installed.) Removing linux-ubuntu-modules-2.6.22-6-generic ... Purging configuration files for linux-ubuntu-modules-2.6.22-6-generic ... FATAL: Could not open '/boot/System.map-2.6.22-6-generic': No such file or directory update-initramfs: Generating /boot/initrd.img-2.6.22-6-generic Cannot find /lib/modules/2.6.22-6-generic update-initramfs: failed for /boot/initrd.img-2.6.22-6-generic dpkg: error processing linux-ubuntu-modules-2.6.22-6-generic (--purge): subprocess post-removal script returned error exit status 1 Errors were encountered while processing: linux-ubuntu-modules-2.6.22-6-generic
I'am unable to purge the package due to an wrong .postrm script because I have uninstalled the linux-image-2.6.22-6-generic before purging the package linux-ubuntu-modules-2.6.22-6-generic. I think postrm script needs to check if the correspondents linux- image-2.6.22-XXX are installed or not. Proposed patch (or something like this): --- debian/control-scripts/postrm.ori 2007-06-26 22:13:13.000000000 +0200 +++ debian/control-scripts/postrm 2007-06-26 22:15:40.000000000 +0200 @@ -2,7 +2,9 @@ case "$1" in remove|purge) - depmod -a -A -q -F /boot/System.map-@@KVER@@ @@KVER@@ - update-initramfs -u -k @@KVER@@ + if [ -f /boot/initrd.img-@@KVER@@ ]; then + depmod -a -A -q -F /boot/System.map-@@KVER@@ @@KVER@@ + update-initramfs -u -k @@KVER@@ + fi ;; esac ** Affects: linux-ubuntu-modules-2.6.22 (Ubuntu) Importance: Undecided Status: New -- Unable to purge package https://bugs.launchpad.net/bugs/122421 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs