Update old release of Ubuntu after end of life to newer one
Problem
I recently wanted to update my Raspberry Pi 4B where i had Ubuntu 21.04 (which reached end of life) to Ubuntu 22.04. But I couldn't use apt update because it couldn't find repositories.
Solution
Make copy of
/etc/apt/sources.list(for backup)Change every
http://ports.ubuntu.com/ubuntu-ports/,http://archive.ubuntu.com/ubuntu/or similar repositories tohttp://old-releases.ubuntu.com/ubuntu/Save and
apt update
Sources
I learned this from https://askubuntu.com/a/1131285