I have updated my Ubuntu 22.04 LTS and I am getting some errors while updating and also coudn't able to install some softwares.
akhil@KHUSHI:~/.config$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Update:
akhil@KHUSHI:~/.config$ sudo apt-get update
Hit:1 https://deb.nodesource.com/node_16.x jammy InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 https://packages.microsoft.com/repos/edge stable InRelease
Hit:5 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease
Hit:6 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:7 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Hit:8 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:9 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
W: https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
My kernal:
akhil@KHUSHI:~$ uname -r
5.15.0-52-generic
Full-Upgrade:
akhil@KHUSHI:~/.config$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Fix Broken Packages:
akhil@KHUSHI:~/.config$ sudo apt -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-unsigned-5.15.0-50-generic
Suggested packages:
fdutils linux-doc | linux-source-5.15.0 linux-tools
linux-headers-5.15.0-50-generic linux-modules-extra-5.15.0-50-generic
The following packages will be REMOVED:
linux-image-5.15.0-50-generic
The following NEW packages will be installed:
linux-image-unsigned-5.15.0-50-generic
0 upgraded, 1 newly installed, 1 to remove and 8 not upgraded.
6 not fully installed or removed.
Need to get 0 B/11.6 MB of archives.
After this operation, 379 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: linux-image-5.15.0-50-generic: dependency problems, but removing anyway as
you requested:
linux-modules-5.15.0-50-generic depends on linux-image-5.15.0-50-generic | linu
x-image-unsigned-5.15.0-50-generic; however:
Package linux-image-5.15.0-50-generic is to be removed.
Package linux-image-unsigned-5.15.0-50-generic is not installed.
(Reading database ... 331119 files and directories currently installed.)
Removing linux-image-5.15.0-50-generic (5.15.0-50.56) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-50-generic
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_
zs8jjk'.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-50-generic (--remove):
installed linux-image-5.15.0-50-generic package post-removal script subprocess
returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.15.0-50-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Update GRUB:
akhil@KHUSHI:~$ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_zs8jjk'.
akhil@KHUSHI:~$ sudo apt-get install --reinstall grub-efi-amd64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-modules-5.15.0-50-generic : Depends: linux-image-5.15.0-50-generic but it is not going to be installed or
linux-image-unsigned-5.15.0-50-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Dependencies:
akhil@KHUSHI:~$ dpkg -L linux-image-5.15.0-50-generic
Package 'linux-image-5.15.0-50-generic' does not contain any files (!)
akhil@KHUSHI:~$ dpkg -l linux-image-5.15.0-50-generic
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================-============-============-===================>
pH linux-image-5.15.0-50-generic 5.15.0-50.56 amd64 Signed kernel image>
[1]+ Stopped dpkg -l linux-image-5.15.0-50-generic
Force remove linux-modules-5.15.0-50-generic:
akhil@KHUSHI:~$ sudo dpkg --purge --force-remove-reinstreq linux-image-5.15.0-50-generic
(Reading database ... 329778 files and directories currently installed.)
Removing linux-image-5.15.0-50-generic (5.15.0-50.56) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-50-generic
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_zs8jjk'.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-50-generic (--purge):
installed linux-image-5.15.0-50-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-5.15.0-50-generic
akhil@KHUSHI:~$ sudo apt-get remove --purge linux-image-5.15.0-50-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
linux-image-5.15.0-50-generic
0 upgraded, 0 newly installed, 1 to remove and 22 not upgraded.
2 not fully installed or removed.
After this operation, 11.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 329778 files and directories currently installed.)
Removing linux-image-5.15.0-50-generic (5.15.0-50.56) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-50-generic
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_zs8jjk'.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-50-generic (--remove):
installed linux-image-5.15.0-50-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.15.0-50-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
ZFS List:
akhil@KHUSHI:~$ zfs list
NAME USED AVAIL REFER MOUNTPOINT
bpool 291M 1.47G 96K /boot
bpool/BOOT 290M 1.47G 96K none
bpool/BOOT/ubuntu_zs8jjk 290M 1.47G 290M /boot
rpool 120G 326G 192K /
rpool/ROOT 25.0G 326G 192K none
rpool/ROOT/ubuntu_zs8jjk 25.0G 326G 15.2G /
rpool/ROOT/ubuntu_zs8jjk/srv 216K 326G 216K /srv
rpool/ROOT/ubuntu_zs8jjk/usr 261M 326G 192K /usr
rpool/ROOT/ubuntu_zs8jjk/usr/local 260M 326G 260M /usr/local
rpool/ROOT/ubuntu_zs8jjk/var 9.53G 326G 192K /var
rpool/ROOT/ubuntu_zs8jjk/var/games 216K 326G 216K /var/games
rpool/ROOT/ubuntu_zs8jjk/var/lib 9.42G 326G 9.20G /var/lib
rpool/ROOT/ubuntu_zs8jjk/var/lib/AccountsService 260K 326G 260K /var/lib/AccountsService
rpool/ROOT/ubuntu_zs8jjk/var/lib/NetworkManager 728K 326G 728K /var/lib/NetworkManager
rpool/ROOT/ubuntu_zs8jjk/var/lib/apt 107M 326G 107M /var/lib/apt
rpool/ROOT/ubuntu_zs8jjk/var/lib/dpkg 124M 326G 124M /var/lib/dpkg
rpool/ROOT/ubuntu_zs8jjk/var/log 96.1M 326G 96.1M /var/log
rpool/ROOT/ubuntu_zs8jjk/var/mail 216K 326G 216K /var/mail
rpool/ROOT/ubuntu_zs8jjk/var/snap 8.00M 326G 8.00M /var/snap
rpool/ROOT/ubuntu_zs8jjk/var/spool 324K 326G 324K /var/spool
rpool/ROOT/ubuntu_zs8jjk/var/www 216K 326G 216K /var/www
rpool/USERDATA 93.9G 326G 192K /
rpool/USERDATA/akhil_pltcof 80.9G 326G 80.9G /home/akhil
rpool/USERDATA/root_pltcof 13.0G 326G 13.0G /root
rpool/keystore 518M 327G 63.5M -
I couldn't able to install new applications or run some of the existing apps or get software updates because of this issue.