sudo apt --reinstall install linux-image-5.4.0-58-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of linux-image-5.4.0-58-generic is not possible, it cannot be downloaded.
The following packages will be REMOVED:
linux-image-5.4.0-58-generic
0 upgraded, 0 newly installed, 1 to remove and 1878 not upgraded.
9 not fully installed or removed.
After this operation, 11.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 472008 files and directories currently installed.)
Removing linux-image-5.4.0-58-generic (5.4.0-58.64) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.4.0-58-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 2: /etc/default/grub: d#: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.4.0-58-generic (--remove):
installed linux-image-5.4.0-58-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-58-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
wes@wes-MS-7C91:~$