Today I did my regular ubuntu update
sudo apt update && sudo apt dist-upgrade
and have been getting the following error
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
linux-image-5.4.0-80-generic
0 to upgrade, 0 to newly install, 1 to remove and 1 not to upgrade.
2 not fully installed or removed.
After this operation, 11.8 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 366812 files and directories currently installed.)
Removing linux-image-5.4.0-80-generic (5.4.0-80.90) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.4.0-80-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found background image: wallpaper.png
Found linux image: /boot/vmlinuz-5.6.19-050619-generic
Found initrd image: /boot/initrd.img-5.6.19-050619-generic
Found linux image: /boot/vmlinuz-5.4.0-84-generic
Found initrd image: /boot/initrd.img-5.4.0-84-generic
Found linux image: /boot/vmlinuz-5.4.0-81-generic
Found initrd image: /boot/initrd.img-5.4.0-81-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
/etc/grub.d/35_fwupd: line 5: /usr/share/grub: Is a directory
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 126
dpkg: error processing package linux-image-5.4.0-80-generic (--remove):
installed linux-image-5.4.0-80-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.4.0-80-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Since then i tried
apt autoremote
apt clean
apt-get install -f
apt --fix-broken install
apt purge linux-image-5.4.0-80-generic
dpkg-reconfigure linux-image-5.4.0-80-generic
dpkg --purge linux-image-5.4.0-80-generic
I also checked available space already:
$ df -H /boot
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p6 212G 135G 67G 67% /
Kernel information:
$ uname -a
Linux Knowhere 5.6.19-050619-generic #202006171132 SMP Wed Jun 17 16:31:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
None of which have worked. Has anyone seen this error before or have any suggestions on how I can get around it.
PS: it looks like there's some issue with grub from the error trace but I'm not sure why this suddenly would have shown up.