By Connor Shea
sudo do-release-upgrade was getting stuck like this when attempting to upgrade from 20.04.6 to 22.04.x:
Get: 22 http://mirrors.digitalocean.com/ubuntu jammy
InRelease [270 kB]
97% [23 InRelease 20.5 kB/270 kB 7%]
The get for jammy InRelease just got triggered over and over, seemingly never making any progress. It gets stuck at 20.5 kB every time. I’m unsure if the file is corrupted or something?
My release logs in /var/log/dist-upgrade/ end with this and no further information:
2025-09-01 21:59:25,830 DEBUG running doUpdate() (showErrors=True)
I tried using RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 do-release-upgrade but it didn’t fix the problem at all.
The only thing that seemingly fixed the problem was replacing http://mirrors.digitalocean.com/ubuntu/ with http://archive.ubuntu.com/ubuntu/ in my /etc/apt/sources.list file. If you already tried to upgrade and the sources.list file mentions jammy (22.04) everywhere, you will likely want to first go back to the old version (thankfully stored at /etc/apt/sources.list.distUpgrade) for focal before updating everything to archive.ubuntu.com.
Also worth noting that - in around 2 years after Jammy 22.04 is EOL’d - I believe that the DigitalOcean mirror - when upgrading from 20.04 to 22.04 - will stop working entirely. Just in case this question gets seen by anyone in 2027.
Posting this in case anyone else runs into this, because I couldn’t find anything on the internet about this problem.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Yeah one option is to point your sources to the main Ubuntu archives instead of the default mirrors. You can do this by editing /etc/apt/sources.list and replacing entries with http://archive.ubuntu.com/ubuntu/.
If the upgrade already rewrote your sources to jammy, you may need to roll back to the saved /etc/apt/sources.list.distUpgrade for focal, run your updates, and then try the upgrade again.
I think that both DigitalOcean mirrors and the main Ubuntu archives serve the same packages, so switching between them during a release upgrade is fine if it helps the process complete.
Just make sure to take a backup of your Droplet before doing such major OS upgrades so that way you could revert back in case that anything goes wrong.
Heya, @connorshea
+1 that both DigitalOcean mirrors and the main Ubuntu archives serve the same packages.
Make sure to take a backup of your Droplet before doing the upgrade and you can also try running your app/code on a dev droplet or container with the newer distro version to make sure everything will run smoothly.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.