Ubuntu – Upgrade from ubuntu 18.04 to 20.04 resulting in error

18.0420.04aptupdatesupgrade

I tried to upgrade from ubuntu 18.04 tp 20.04 using the below command
sudo update-manager -d
I am getting the below error

An unresolvable problem occurred while calculating the upgrade.

This was caused by:
* Upgrading to a pre-release version of Ubuntu
This is most likely a transient problem,
please try again later.
If none of this applies, then please report this bug using the command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If you want to investigate this yourself the log files in '/var/log/dist-upgrade' will contain details about the upgrade. Specifically, look at 'main.log' and 'apt.log'.

Best Answer

In some cases it might be more than one package, I followed these steps:

  1. Check on the file /var/log/dist-upgrade/apt.log for any broken package listed there

  2. Remove the package using apt sudo apt remove {broken package name}

  3. Run sudo apt autoremove to get ride of residual packages

  4. Run sudo do-release-upgrade again if it throws the error message below:

    Could not calculate the upgrade

    An unresolvable problem occurred while calculating the upgrade.

    This was likely caused by:

    • Unofficial software packages not provided by Ubuntu Please use the tool 'ppa-purge' from the ppa-purge package to remove software from a Launchpad PPA and try the upgrade again.

    If none of this applies, then please report this bug using the command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If you want to investigate this yourself the log files in '/var/log/dist-upgrade' will contain details about the upgrade. Specifically, look at 'main.log' and 'apt.log'.

Repeat step 1 to 4