Upgrade from Ubuntu 18.10 to 20.04

Hello,

I have a container which i would like to upgrade to latest LTS. This article seems to be the way, however I seem to be missing the package,

# do-release-upgrade
bash: do-release-upgrade: command not found

# apt install ubuntu-release-upgrader-core
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  python-apt-common python3-apt python3-distro-info python3-distupgrade python3-update-manager
Suggested packages:
  python3-apt-dbg python-apt-doc python3-launchpadlib
The following NEW packages will be installed:
  python-apt-common python3-apt python3-distro-info python3-distupgrade python3-update-manager ubuntu-release-upgrader-core
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 343 kB of archives.
After this operation, 2652 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Err:1 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 python-apt-common all 1.7.1
  404  Not Found [IP: 91.189.88.142 80]
Err:2 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 python3-apt amd64 1.7.1
  404  Not Found [IP: 91.189.88.142 80]
Err:3 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 python3-distro-info all 0.18ubuntu0.18.10.2
  404  Not Found [IP: 91.189.88.142 80]
Err:4 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 python3-update-manager all 1:18.10.10.2
  404  Not Found [IP: 91.189.88.142 80]
Err:5 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 python3-distupgrade all 1:18.10.11.9
  404  Not Found [IP: 91.189.88.142 80]
Err:6 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 ubuntu-release-upgrader-core all 1:18.10.11.9
  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt-common_1.7.1_all.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python3-apt_1.7.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/distro-info/python3-distro-info_0.18ubuntu0.18.10.2_all.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/u/update-manager/python3-update-manager_18.10.10.2_all.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-release-upgrader/python3-distupgrade_18.10.11.9_all.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-release-upgrader/ubuntu-release-upgrader-core_18.10.11.9_all.deb  404  Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

How do i update the container?

Most likely you need to run first apt update.

Thanks. I modified source definitions in /etc/apt/sources.list to old-releases and was able to apt-update. Following that i ran,

wget http://archive.ubuntu.com/ubuntu/dists/disco-updates/main/dist-upgrader-all/current/disco.tar.gz
the untarred under /tmp/upgrade
and ran
python3 dist-upgrade.py

And set both disco and eoan to supported=1 in /var/lib/update-manager/meta-release. After running do-release-upgrade few times i was able to upgrade to 20.04.

some other useful commands i found in the process,

wget http://old-releases.ubuntu.com/ubuntu/dists/disco/main/dist-upgrader-all/current/disco.tar.gz
apt-get install --reinstall python3-distro-info
apt-get install --reinstall python3-apt
apt install ubuntu-release-upgrader-core