8

Since 21.10 isn't supported anymore, I'd like to upgrade to 22.04. However, running

sudo do-release-upgrade

gives the following output

...
Please install all available updates for your release before upgrading.

But I can't install all available updates, since 21.10 isn't supported anymore. Running

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

Just gives a lot of 404s since 21.10 isn't available anymore.

So what to do? I want to upgrade to 22.04, but have to update 21.10 before doing so. But I can't do that because it's not supported.

2 Answers2

8

Use this script:

#!/bin/bash
sudo sed -i 's/continue/pass/g' /usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py
sudo sed -i 's/impish/jammy/g' /etc/apt/sources.list
sudo apt-get update
echo "Upgrade distro"
sudo do-release-upgrade
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get install -f -y
sudo apt-get autoremove --purge -y

From :

https://github.com/daboynb/linux_scripts/blob/main/eol_to_jammy_source.sh

and

https://stackoverflow.com/questions/73034540/an-upgrade-from-hirsute-to-jammy-is-not-supported-with-this-tool

yammy
  • 81
1
  1. Make a backup to /etc/apt/sources.list and /etc/apt/source.list.d/*, or make a backup to the entire system instead whenever possible. You can then restore your system in case you messed it up.
  2. In /etc/apt/sources.list, change all impish to jammy.
  3. Comment out all entries in /etc/apt/sources.list.d/ (recommended) or change all impish to jammy (not recommended, as not all third-party repositories are ready for 22.04).
  4. Run sudo apt update
    • Comment out the entries in /etc/apt/sources.list.d/ if they failed to upgrade
  5. Run sudo apt full-upgrade
  6. Reboot your computer. Your computer should boot into 22.04 now.
  7. Restore the entries in /etc/apt/sources.list.d/ (if you commented them out in step 3, but do not forget to change all impish to jammy), then run sudo apt update to check for updates and repository availability.

Note that when editing the source files, you should never use sudo gedit /etc/apt/source.list. Use gedit admin:///etc/apt/source.list or use a command-line text editor (nano is a simple and fast one) instead.

1F616EMO
  • 625