Skip Navigation

Can't install or remove using apt.

Greetings. APT is completely broken and I have no idea why. Whenever I try install, remove, or upgrade a package (or packages) I receive this error:

Removing linux-image-6.2.0-23-generic (6.2.0-23.23) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-6.2.0-23-generic /etc/kernel/postrm.d/zz-update-grub: Sourcing file `/etc/default/grub' /usr/sbin/grub-mkconfig: 12: /etc/default/grub: i915.enable_psr=0: not found run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127 dpkg: error processing package linux-image-6.2.0-23-generic (--remove): installed linux-image-6.2.0-23-generic package post-removal script subprocess returned error exit status 1 dpkg: too many errors, stopping Errors were encountered while processing: linux-image-6.2.0-23-generic Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried researching my problem online but got nowhere. Any help would be appreciated it.

OS: Kubuntu 23.04

5
5 comments