0

I tried to upgrade from 18.04 to 20.04 using the terminal and the process aborts without any information messages:

frepie@frepie-K55N:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1,554 B]                                
Get:2 Upgrade tool [1,340 kB]                                         
Fetched 1,342 kB in 0s (0 B/s)                                        
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg' 
extracting 'focal.tar.gz'

Reading cache

Checking package manager Reading package lists... Done Building dependency tree
Reading state information... Done Hit http://ca.archive.ubuntu.com/ubuntu bionic InRelease
Get:1 http://ca.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Hit https://linux.teamviewer.com/deb stable InRelease
Get:3 http://ca.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Hit https://repo.skype.com/deb stable InRelease
Hit http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu bionic InRelease Hit https://packages.microsoft.com/repos/ms-teams stable InRelease
Hit http://ppa.launchpad.net/nixnote/nixnote2-stable/ubuntu bionic InRelease Hit http://ppa.launchpad.net/obsproject/obs-studio/ubuntu bionic InRelease Hit http://ppa.launchpad.net/team-xbmc/ppa/ubuntu bionic InRelease
Hit https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease Hit http://ppa.launchpad.net/tsbarnes/indicator-keylock/ubuntu bionic InRelease Fetched 252 kB in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Restoring original system state

Aborting Reading package lists... Done
Building dependency tree
Reading state information... Done frepie@frepie-K55N:~$

frepie
  • 555
  • Try to switch from ca.archive.ubuntu.com to archive.ubuntu.com . – N0rbert Sep 12 '21 at 21:00
  • 2
    While it's most common that all your PPAs have introduced a conflict of some kind, there are many other possibilities. Are you absolutely sure there is not a complete log of the failure in /var/log/dist-upgrade/main.log or other logfiles? – user535733 Sep 12 '21 at 21:26

1 Answers1

1

You cannot always upgrade to a new release when you have PPAs still enabled. You should only have the official sources before you start the upgrade process.

You also have sources that are for Debain and not Ubuntu. This can cause a lot of problems with your package management even in-between release upgrades.

It depends on how far the release upgrade proceeded. If this upgrade attempt failed halfway through, you may need to perform a clean installation. It can be difficult to release upgrade after a failed attempt. If you are not very proficient in solving potentially several issues due to the failed release upgrade, a clean installation will be much easier and more reliable.

If the release upgrade stopped at the very beginning, you should be able to proceed with the release upgrade after removing the offending sources.


To disable sources, first make a backup of your current list of sources:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

Then edit the sources.list:

sudo nano /etc/apt/sources.list

Comment out all sources that are not official Ubuntu sources by putting a # before each line. In your example above, you should comment every line that doesn't include ubuntu.com, so comment out all the PPA lines from launchpad.net as well as Skype, teamviewer, slack, Microsoft, etc.

When you are finished editing, press CTRL+O to save, then CTRL+X to exit.

Nmath
  • 12,333
  • Not 100% true. PPAs and 3rd-party repositories will be disabled on upgrade anyway. Broken packages will be removed during upgrade. Obsolete will be removed at end on request. – N0rbert Sep 12 '21 at 21:08
  • Indications of what the culprits are here would be appreciated. We are not all Ubuntu experts, this is why we ask questions here. – frepie Sep 12 '21 at 21:08
  • @N0rbert - it's supposed to, but in reality, it can be problematic: it's best practice to go ahead and disable them manually before beginning the upgrade. My best guess is that the main culprit preventing upgrade is https://packagecloud.io/slacktechnologies/slack/debian jessie, but other sources could also be problematic. – Nmath Sep 12 '21 at 21:59
  • @frepie please see update with instructions on how to comment out sources that are not default. – Nmath Sep 12 '21 at 22:00
  • @frepie Also, there are other questionable sources-- indicator-keylock has not been updated in 66 weeks, which could mean that there are dependency issues if the project is abandoned. Also, you have PPAs for flatpak and obs-studio, even though both of those packages are already in official repositories. It might be better to use the official repos instead of PPA for these, unless you have a specific reason. PPAs are not always the best way to install software. See: Are PPAs safe to add to my system and what are some "red flags" to watch out for? – Nmath Sep 12 '21 at 22:11
  • slack is probably best installed through the snap instead of PPA with sudo snap install slack --classic – Nmath Sep 12 '21 at 22:14