Upgrade from 18.04 to 20.04 prevented by 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'

Solution 1:

The python-dev package is blocking the intended upgrade from 18.04 to 20.04. This package has been discontinued in 20.04 because Python 2.x is no longer being maintained. Open the terminal and type:

sudo apt remove python-dev python-is-python2 
sudo apt autoremove  

gnuradio-dev depends on python-dev, so run the following command to uninstall it.

sudo apt remove gnuradio-dev

After you have removed python-dev and gnuradio-dev you may be able to upgrade from 18.04 to 20.04 with do-release-upgrade -d without getting an E:Error, pkgProblemResolver::Resolve generated breaks error message. If not see the answers to E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

If that doesn't work do as follows:

sudo apt install ppa-purge aptitude
cat /etc/apt/sources.list

Run sudo ppa-purge ppa-name to uninstall all the packages from the PPAs in your software sources. Then run sudo apt update and try to upgrade from 18.04 to 20.04 with do-release-upgrade -d.

If you try to release upgrade from the terminal and fail, you will get an error message pointing to the location of the log file where the information about which package caused the error message is stored. If not too many other packages depend on whatever package is blocking the release upgrade, you can safely uninstall it and reinstall it after the release upgrade is finished.

Solution 2:

I had to uninstall

apt remove python2.7-minimal

and unfortunately all its dependencies.