Fix "Could not calculate the upgrade" on Ubuntu 24.04 to 26.04
Diagnose "Could not calculate the upgrade" when moving from Ubuntu 24.04 to 26.04, then clear held packages, broken dependencies and conflicting PPAs.
Diagnose the "Could not calculate the upgrade" failure during an Ubuntu 24.04 LTS to 26.04 LTS release upgrade, resolve package resolver conflicts, and resume the upgrade.
[1] Check the dist-upgrade logs to locate why the upgrade halted.
# tail -n 25 /var/log/dist-upgrade/main.log[2] Inspect apt.log for broken packages flagged by the resolver.
# grep -i broken /var/log/dist-upgrade/apt.log[3] List and unhold any held packages preventing dependency resolution.
# apt-mark showhold# apt-mark unhold <package-name>[4] Purge conflicting third-party PPAs and revert their packages.
# apt -y install ppa-purge# ppa-purge ppa:<ppa-owner>/<ppa-name>[5] Bring the current release fully up to date and fix broken dependencies.
# apt update# apt -y full-upgrade# apt -y --fix-broken install[6] Run the release upgrade again.
# do-release-upgrade