I've just recently installed Ubuntu 20.04 on my PC. When I try to sudo apt-get update in a new terminal, it gives me this error:
Hit:1 http://ppa.launchpad.net/git-core/ppa/ubuntu trusty InRelease
Err:2 http://my.old-releases.ubuntu.com/ubuntu focal InRelease
Could not resolve 'my.old-releases.ubuntu.com'
Ign:3 http://old-releases.ubuntu.com/ubuntu focal-security InRelease
Err:4 http://old-releases.ubuntu.com/ubuntu focal-security Release
404 Not Found [IP: 91.189.91.123 80]
Err:5 http://my.old-releases.ubuntu.com/ubuntu focal-updates InRelease
Could not resolve 'my.old-releases.ubuntu.com'
Err:6 http://my.old-releases.ubuntu.com/ubuntu focal-backports InRelease
Could not resolve 'my.old-releases.ubuntu.com'
Reading package lists... Done
E: The repository 'http://old-releases.ubuntu.com/ubuntu focal-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
How do I rectify this error? Thanks and I look forward to your answer shortly.
old-releases.ubuntu.com
normy.old-releases.ubuntu.com
are part of a stock 20.04 install, so it seems clear that you have made some changes. Look at each error, and undo the change you made that caused it. If that's too much work, or you're not sure how to undo the change, then backup your data and reinstall...or ask a new question on how to undo that specific change. – user535733 Nov 01 '21 at 17:00