Akom's Tech Ruminations

Various tech outbursts - code and solutions to practical problems
Linux

Upgrading a non-LTS Ubuntu installation after EOL

Posted by Admin • Thursday, September 1. 2022 • Category: Linux

If you don't upgrade a non-LTS release (eg: 21.10) to a supported version before End-Of-Life, you will be dealing with a rather awkward user experience.  Here is what happens:

$ do-release-upgrade

Please install all available updates for your release before upgrading.

Yet if you atempt to install updates, that fails:

$ apt dist-upgrade -y

Err:5 http://archive.ubuntu.com/ubuntu impish Release
  404 Not Found [IP: 2001:67c:1562::18 80]

...

Essentially, apt cache knows about some pending updates, but the actual packages are not longer available.  You can't update them, so you can't upgrade your OS.


The good news is that there are a couple of solutions.

Solution 1

Clear the apt cache.  This worked on one machine, and not another, so your mileage may vary.  Try

apt clean

Then attempt to upgrade again

Solution 2

Follow https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1982791/comments/3.  Essentially, the missing packages still exist but at a different location.  You need to manually change your repository urls.  

  • Edit your /etc/apt/sources.list
  • Change all URLs from ?.archive.ubuntu.com to http://old-releases.ubuntu.com
  • Install updates: apt dist-upgrade
  • Upgrade should now work (you may be prompted to reboot first)

 

0 Trackbacks

  1. No Trackbacks

0 Comments

Display comments as (Linear | Threaded)
  1. No comments

Add Comment


You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
Markdown format allowed


Submitted comments will be subject to moderation before being displayed.