When I upgrade Ubuntu from 21.10 to 22.04, I encounter the following error:
# apt dist-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:
gdm3 : Depends: gir1.2-gdm-1.0 (= 41~rc-0ubuntu2pop0~1634915133~21.10~cf40258) but 42.0-1ubuntu6pop1~1650301427~22.04~2055533 is installed
Depends: libgdm1 (= 41~rc-0ubuntu2pop0~1634915133~21.10~cf40258) but 42.0-1ubuntu6pop1~1650301427~22.04~2055533 is installed
gnome-control-center : Depends: gnome-control-center-data (< 1:41) but 1:41.4-1ubuntu12pop1~1651079086~22.04~c5012df is installed
gnome-settings-daemon : Depends: gnome-settings-daemon-common (= 40.0.1-1ubuntu3pop0~1639691325~21.10~3bcd31b) but 42.1-1ubuntu1pop0~1649081298~22.04~192b1be is installed
libwacom2 : Depends: libwacom-common (= 1.8-2ubuntu2) but 2.2.0-1 is installed
systemd : Depends: libsystemd0 (= 248.3-1ubuntu8.6~1650893010~21.10~9a0cd5e) but 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
gdm3 : Depends: gir1.2-gdm-1.0 (= 41~rc-0ubuntu2pop0~1634915133~21.10~cf40258) but 42.0-1ubuntu6pop1~1650301427~22.04~2055533 is installed
Depends: libgdm1 (= 41~rc-0ubuntu2pop0~1634915133~21.10~cf40258) but 42.0-1ubuntu6pop1~1650301427~22.04~2055533 is installed
gnome-control-center : Depends: gnome-control-center-data (< 1:41) but 1:41.4-1ubuntu12pop1~1651079086~22.04~c5012df is installed
gnome-settings-daemon : Depends: gnome-settings-daemon-common (= 40.0.1-1ubuntu3pop0~1639691325~21.10~3bcd31b) but 42.1-1ubuntu1pop0~1649081298~22.04~192b1be is installed
libwacom2 : Depends: libwacom-common (= 1.8-2ubuntu2) but 2.2.0-1 is installed
systemd : Depends: libsystemd0 (= 248.3-1ubuntu8.6~1650893010~21.10~9a0cd5e) but 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
All options fail. How to fix it?
Found the solution (after encountering the same problem twice in a row, for 2 laptops, both from 21.10 to 22.04)
The only cause of the problem is using the OS upgrade GUI for ubuntu (setting -> OS upgrades and recovery -> OS upgrade), this option is either broken or for Ubuntu only, it doesn't apply to Pop OS.
There is only 1 correct way to upgrade Pop_OS, and it is not through any GUI:
Doing so either start an upgrade from scratch or recover from a broken upgrade.