Cannot upgrade to Ubuntu 20 due to broken packages

Hi,

when trying to upgrade to Ubuntu 20 the process aborts because of broken packages.

Grepping for “broken” I see

 var/log/dist-upgrade/apt.log:Broken python-dev:amd64 Depends on python:amd64 < 2.7.15~rc1-1 @ii gR > (= 2.7.15~rc1-1)
/var/log/dist-upgrade/apt.log:Broken python2:amd64 Breaks on python:amd64 < 2.7.15~rc1-1 @ii gK Ib > (< 2.7.15-2)
/var/log/dist-upgrade/apt.log:Broken python-all-dev:amd64 Depends on libpython-all-dev:amd64 < 2.7.15~rc1-1 | 2.7.17-2ubuntu4 @ii umH > (= 2.7.17-2ubuntu4)
/var/log/dist-upgrade/apt.log:Broken python2-dev:amd64 Breaks on python-dev:amd64 < 2.7.15~rc1-1 @ii mK Ib > (< 2.7.15-2)
/var/log/dist-upgrade/apt.log:Broken libpython2-dev:amd64 Breaks on libpython-dev:amd64 < 2.7.15~rc1-1 @ii mK > (< 2.7.15-2)
/var/log/dist-upgrade/apt.log:Broken python-dev:amd64 Depends on python:amd64 < 2.7.15~rc1-1 @ii gR > (= 2.7.15~rc1-1)
/var/log/dist-upgrade/apt.log:Broken python2:amd64 Breaks on python:amd64 < 2.7.15~rc1-1 @ii gK Ib > (< 2.7.15-2)
/var/log/dist-upgrade/apt.log:Broken python-all-dev:amd64 Depends on python2-dev:amd64 < none | 2.7.17-2ubuntu4 @un uH > (= 2.7.17-2ubuntu4)
/var/log/dist-upgrade/apt.log:Broken libpython-all-dev:amd64 Depends on libpython2-dev:amd64 < none | 2.7.17-2ubuntu4 @un uH > (= 2.7.17-2ubuntu4)
/var/log/dist-upgrade/apt.log:Broken python-dev:amd64 Depends on python:amd64 < 2.7.15~rc1-1 @ii gR > (= 2.7.15~rc1-1)
/var/log/dist-upgrade/apt.log:Broken python2:amd64 Breaks on python:amd64 < 2.7.15~rc1-1 @ii gK Ib > (< 2.7.15-2)
/var/log/dist-upgrade/apt.log:Broken python-all:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
/var/log/dist-upgrade/apt.log:Broken python:amd64 PreDepends on python-minimal:amd64 < 2.7.15~rc1-1 @ii gR > (= 2.7.15~rc1-1)
/var/log/dist-upgrade/apt.log:Broken python:amd64 Depends on libpython-stdlib:amd64 < 2.7.15~rc1-1 @ii gR > (= 2.7.15~rc1-1)
/var/log/dist-upgrade/apt.log:Broken python-is-python2:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH >
/var/log/dist-upgrade/apt.log:Broken python-is-python2:amd64 Breaks on python:amd64 < 2.7.15~rc1-1 @ii gK >
/var/log/dist-upgrade/apt.log:Broken python-dev:amd64 Depends on python:amd64 < 2.7.15~rc1-1 @ii gR > (= 2.7.15~rc1-1)
/var/log/dist-upgrade/apt.log:Broken python2-minimal:amd64 Breaks on python-minimal:amd64 < 2.7.15~rc1-1 @ii gK > (< 2.7.15-2)
/var/log/dist-upgrade/apt.log:Broken libpython2-stdlib:amd64 Breaks on libpython-stdlib:amd64 < 2.7.15~rc1-1 @ii gK > (< 2.7.15-2)
/var/log/dist-upgrade/apt.log:Broken python2:amd64 PreDepends on python2-minimal:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
/var/log/dist-upgrade/apt.log:Broken python-all:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
/var/log/dist-upgrade/apt.log:Broken lambda-desktop:amd64 Depends on python-all:amd64 < 2.7.15~rc1-1 | 2.7.17-2ubuntu4 @ii umR >
/var/log/dist-upgrade/apt.log:Broken python-is-python2:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH >

Would anyone have an idea what to do here? Many thanks!!

Try this:

sudo apt-get update --fix-missing
sudo apt-get install -f

Let me know if that works.

Thanks for the quick answer! Unfortunately no, didn’t help …
I now tried something pretty drastic - uninstalled python2, as all of the things above involved python2 …
upgrade is running now :slight_smile:

I’ll probably have to reinstall lambda stack … actually i hope it won’t reinstall python2, as i’d rather not have that on the system at all … (unless for possible internal use by linux or the distro) …

1 Like

Thank you! I was in the same boat, trying to upgrade my workstation to Ubuntu 20.04. Received:

This was likely caused by:* Unofficial software packages not provided by UbuntuPlease use the tool ‘ppa-purge’ from the ppa-purgepackage to remove software from a Launchpad PPA andtry the upgrade again.

Removing python2 allowed the update scripts to work:
sudo apt purge python2.7-minimal

Does this help: How do I upgrade Ubuntu and Lambda Stack? | Lambda Docs ?