Problem: linux kernel 4.8 was installed and it was unable to process when I was downloading or upgrading other programs and it wasn't letting me uninstall it neither from Synaptic Package Manager or from the terminal because it showed errors. So...
Solution: https://ubuntuforums.org/showthread....1735575&page=2
Code:
sudo mv /etc/kernel/postrm.d/zz-update-grub /etc/kernel/postrm.d/zz-update-grub.bad
sudo apt-get install -f
sudo mv /etc/kernel/postrm.d/zz-update-grub.bad /etc/kernel/postrm.d/zz-update-grub
Basically, this error appeared when I tried to install a program:
Code:
sudo apt-get install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.8.0-040800rc1-generic linux-image-4.8.0-040800rc3-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 386 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 258226 files and directories currently installed.)
Removing linux-image-4.8.0-040800rc1-generic (4.8.0-040800rc1.201608072231) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.8.0-040800rc1-generic /boot/vmlinuz-4.8.0-040800rc1-generic
update-initramfs: Deleting /boot/initrd.img-4.8.0-040800rc1-generic
New kernel install - deferring aufs update to postinst
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.8.0-040800rc1-generic /boot/vmlinuz-4.8.0-040800rc1-generic
/usr/sbin/grub-probe: error: failed to get canonical path of `aufs'.
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-4.8.0-040800rc1-generic.postrm line 328.
dpkg: error processing package linux-image-4.8.0-040800rc1-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.8.0-040800rc3-generic (4.8.0-040800rc3.201608212032) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.8.0-040800rc3-generic /boot/vmlinuz-4.8.0-040800rc3-generic
update-initramfs: Deleting /boot/initrd.img-4.8.0-040800rc3-generic
New kernel install - deferring aufs update to postinst
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.8.0-040800rc3-generic /boot/vmlinuz-4.8.0-040800rc3-generic
/usr/sbin/grub-probe: error: failed to get canonical path of `aufs'.
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-4.8.0-040800rc3-generic.postrm line 328.
dpkg: error processing package linux-image-4.8.0-040800rc3-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-4.8.0-040800rc1-generic
linux-image-4.8.0-040800rc3-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
So I followed the steps above (renaming the file which caused the error) and linux 4.8 kernel was able to UNINSTALL.
After hours of searching!
Thanks to everyone that helped me out!
Bookmarks