How to recover interrupted do-release-upgrade?

jp flag

I am running Ubuntu 20.04, I wanted to upgrade to 22 using do-release-upgrade. I started the process but the download was very slow. So, at about 5% of the download phase I interrupted the process to change mirrors. I thought it would be fine to interrupt the process and run it again to resume it. The download was at like 5%, so I thought it was just downloading the new packages, but now if I run apt list I see some installed packages with focal tag, so maybe some things were already installed after all.

Now if I run do-release-upgrade it just says:

Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

lsb_release -a still says I'm on 20.04:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

I see that /etc/apt/sources.list points to jammy repositories, so I guess that's why do-release-upgrade asks me to download "all the available updates".

I have seen answers to similar questions saying that the user should revert the /etc/apt/sources.list to the old version (in my case that would be to focal repositories), then run do-release-upgrade again, but I don't want to break everything, so I'm asking here to be sure.

What should I do?

ng flag

As package manager is already in the jammy repositories, you cannot do the release upgrade anymore, but rather just upgrade all the packages themselves.

sudo apt update && sudo apt full-upgrade

...should do the trick.

I had a flawed USB wifi stick in my desktop machine while doing this, and the connection would drop a few times over the upgrade process. But eventually it all went just fine with the above method.

I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.