I have a system with some broken dependencies, but when trying to uninstall them, via apt-get purge or via dpkg --purge --force-all, the process fails with errors were encountered while processing.More specifically, I have a linux-image-extra package and it's linux-image dependency is no longer isntallable. I have more recent kernels installed so removing this should not be a problem, but the uninstall process always fails.So can I force remove that package so there are no more conflicts and I can update my system again? The errors while uninstalling:sudo dpkg --purge --force-all linux-image-extra-3.19.0-51-generic(Reading database ... 229019 files and directories currently installed.)Removing linux-image-extra-3.19.0-51-generic (3.19.0-51.58) ...depmod: FATAL: could not load /boot/System.map-3.19.0-51-generic: No such file or directoryrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-51-generic /boot/vmlinuz-3.19.0-51-genericrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-51-generic /boot/vmlinuz-3.19.0-51-genericupdate-initramfs: Generating /boot/initrd.img-3.19.0-51-genericWARNING: missing /lib/modules/3.19.0-51-genericEnsure all necessary drivers are built into the linux image!depmod: ERROR: could not open directory /lib/modules/3.19.0-51-generic: No such file or directorydepmod: FATAL: could not search modules: No such file or directorysed: can't read /usr/share/plymouth/themes/kubuntu-text/kubuntu-text.plymouth: No such file or directoryE: /usr/share/initramfs-tools/hooks/plymouth failed with return 2.update-initramfs: failed for /boot/initrd.img-3.19.0-51-generic with 2.run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 2dpkg: error processing package linux-image-extra-3.19.0-51-generic (--purge): subprocess installed post-removal script returned error exit status 1Errors were encountered while processing: linux-image-extra-3.19.0-51-generic
Force package uninstall when it fails
ubuntu