jacob@Gandalf:~$ sudo dpkg --force-all -P linux-image-extra-3.16.0-77-generic linux-image-3.16.0-77-generic
(Reading database ... 301055 files and directories currently installed.)
Removing linux-image-extra-3.16.0-77-generic (3.16.0-77.99~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.16.0-77-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-77-generic
WARNING: missing /lib/modules/3.16.0-77-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.16.0-77-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
W: mdadm: the array /dev/md125 with UUID 6ba3fa95:1802fe92:f2399aa8:bff6ede4
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
depmod: WARNING: could not open /var/tmp/mkinitramfs_rNWsqj/lib/modules/3.16.0-77-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_rNWsqj/lib/modules/3.16.0-77-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
Generating grub configuration file ...
grub-probe: error: disk `mduuid/6ba3fa951802fe92f2399aa8bff6ede4,1' not found.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-extra-3.16.0-77-generic (--purge):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.16.0-77-generic (3.16.0-77.99~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
update-initramfs: Deleting /boot/initrd.img-3.16.0-77-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
Generating grub configuration file ...
grub-probe: error: disk `mduuid/6ba3fa951802fe92f2399aa8bff6ede4,1' not found.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.16.0-77-generic.postrm line 328.
dpkg: error processing package linux-image-3.16.0-77-generic (--purge):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-3.16.0-77-generic
linux-image-3.16.0-77-generic
jacob@Gandalf:~$