2

I have edited my sources.list because I couldn't do update because it throws a series of error code 404. I followed some steps on the internet so it would lead to id.old-releases.ubuntu.com, but it's still failed (I was trying to download samba for my school's project and I got panicked because of it). I haven't backup my sources.list file, and I'm confused what to do now.

This is what the code that I use to change the sources.list:

$ sudo sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

Most of the errors that I got were similar like this.

Err http://id.old-releases.ubuntu.com vivid-backports Release.gpg              
Could not resolve 'id.old-releases.ubuntu.com'

Could anybody help? I don't really understand how Ubuntu works.

  • 1
    It's strongly recommended that you upgrade to 16.04. It has security updates you won't get anymore with 15.04. Plus, it's an LTS version, so you won't need to upgrade until April 2021. – Chai T. Rex Jan 16 '18 at 4:47
  • @ChaiT.Rex I see. Can I upgrade it directly or I have to install it all over again? – Mizuki Namikaze Jan 16 '18 at 4:53
  • I don't know what the id. at the start is for. Open a browser and look at old-releases.ubuntu.com and you'll get results, but with the id.old-re* I get 404 errors too. My suggestion is remove id. as a temporary fix, but @ChaiT.Rex is correct - a better solution is to upgrade to a supported Release. – guiverc Jan 16 '18 at 4:55
  • @guiverc The id. is for Indonesia's Ubuntu servers (id.archive.ubuntu.com, for example). – Chai T. Rex Jan 16 '18 at 4:55
  • 1
    @guiverc Yeah, that's what's causing the error. The id. part should have been stripped as well, but the sed command didn't consider it to be a possibility. – Chai T. Rex Jan 16 '18 at 4:59
3

You should really upgrade to 16.04 so you keep getting security updates and so forth. That said, this problem can be fixed.

The instructions you were given assume that your sources.list file connected to the default Ubuntu servers, but your system connected to the Ubuntu servers in Indonesia, so they had an id. in front of the server name (like id.archive.ubuntu.com). That assumption was wrong, so it left the id. part in there, and old-releases.ubuntu.com doesn't support it, so it should be removed.

To fix it, run:

sudo sed -i.bak 's/id.old-/old-/g' /etc/apt/sources.list
sudo apt-get update

Not the answer you're looking for? Browse other questions tagged or ask your own question.