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.

  • Refer https://help.ubuntu.com/community/EOLUpgrades for how to manually change your sources so you can apply all upgrades & then (after reboot if required) perform the release-upgrade. Take note of EOL (9 months after release date) or EOL warning notices (6 weeks prior to EOL) in future. The additional step you now need to perform isn't required if you upgrade prior to EOL or very soon after; alas you missed that window – guiverc Jul 27 '22 at 06:22
  • Do note: you mention both 21.10 & 20.10 and upgrade procedures differ for both (a little; as 20.10 was QA-tested & supported to upgrade to 21.04 which is now EOL; 21.10 (hirsute) upgrades to 22.04 (jammy) which is supported). I've assumed you're using 21.10 as tagged & referenced as well; ignoring the 20.10 (groovy) you also reference. – guiverc Jul 27 '22 at 06:24
  • Thanks, misspelling from my part, I meant 21.10 all the way. I've edited the post to correct that. – Per Höckerman Jul 27 '22 at 07:00

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
  • 2
  • 2
    Well done! This script worked perfectly for me! It took many hours to complete on my system, but overall, flawless! – erwin Aug 18 '22 at 03:08
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.

Emoji
  • 577