Score:2

*Error* for Sudo apt-get update on ubuntu 20.04

my flag

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.

user535733 avatar
cn flag
Neither the git-core PPA nor `old-releases.ubuntu.com` nor `my.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.
EODCraft Staff avatar
cn flag
"Trusty" is Ubuntu 14.04. Something went terribly wrong with your install. Re-install after a good Wipe of the HD.
N0rbert avatar
zw flag
Do you remember why and when your system started to have *my.old-releases* / *old-releases* is *sources.list*? @EODCraftStaff reinstallation is very time-consuming procedure. Bad recommendation.
Score:4
zw flag

Ubuntu 20.04 LTS (focal) is actual release, so its packages are located in archive, not old-releases. You can fix this problem by using commands below:

sudo sed -i "s/my.old-releases/archive/g" /etc/apt/sources.list /etc/apt/sources.list.d/*.list
sudo sed -i "s/old-releases/archive/g" /etc/apt/sources.list /etc/apt/sources.list.d/*.list

and then update package lists by

sudo apt-get update
FabioSpaghetti avatar
in flag
Doing this on Ubuntu 20.04, I got again the exact same error
FabioSpaghetti avatar
in flag
Hit:1 http://de.archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Ign:3 http://packages.ros.org/ros/ubuntu jammy InRelease Err:4 http://packages.ros.org/ros/ubuntu jammy Release 404 Not Found [IP: 64.50.236.52 80] Reading package lists... Done E: The repository 'http://packages.ros.org/ros/ubuntu jammy 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 con..
FabioSpaghetti avatar
in flag
The whole error is too long for commenting
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.