Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

after using ubuntu for about a year, it's time to pose my first question.
I am running ubuntu 12.04.3 and recently I've had some issues with resynchronizing the package index files.

sudo apt-get update produced these errors:

W: Failed to fetch  404  Not Found
W: Failed to fetch  404  Not Found
W: Failed to fetch  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

A look at my /etc/apt/sources.list reveals the following:

# deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ oneiric main restricted
# deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ dists/oneiric/main/binary-i386/
deb hardy-security main
deb-src hardy-security main
deb precise main restricted
deb-src precise main restricted
deb precise-updates main restricted
deb-src precise-updates main restricted
deb precise universe
deb-src precise universe
deb precise-updates universe
deb-src precise-updates universe
deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse
deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse
deb precise-security main restricted
deb-src precise-security main restricted
deb precise-security universe
deb-src precise-security universe
deb precise-security multiverse
deb-src precise-security multiverse
deb precise main
deb-src precise main

Apparently, the file contains two Hardy repositories, which cause the problem, as Hardy has reached its EOF, as can be seen here.

I found two possible solutions to this problem:
1. change the url for the hardy repositories from to (old releases server, source)
2. remove / replace the hardy repositories

So here are the questions for you:
1. which approach should I pursue? (I think the second one, as using outdated repositories isn't a good idea anyways, see e.g. here)
2. if I choose the second approach, can I simply delete the hardy-security repos (as the corresponding precise repos are already contained)? Is this procedure safe in terms of system stability?

Thanks in advance,

share|improve this question
Though the Hardy repos are obsolete in your case, your question helped me to get the repos working again on one of my old machines not yet migrated. Thanks for that! – Izzy Oct 3 '13 at 15:14
up vote 2 down vote accepted

Delete the hardy lines. They're not needed. You already have modern precise versions of the -security repo so there's nothing else to do.

And yes, this should be perfectly safe. The repos are already not doing anything (they're 404ing so aren't contributing to the current available package list) and even if they were working, all its packages should have been superseded by more modern packages in precise-security.

I'd be curious to know how you ended up with hardy repos in your sources. Looks like you installed at Oneiric so this isn't a hangover from an original install… Very odd.

share|improve this answer
I've installed at Oneiric and upgraded to Precise. I can't remember to ever have touched source.list (as I only became aware of it when the issue arose)... – silvio Sep 25 '13 at 21:27
If you want a single command line to solve this use sudo sed '/hardy/d' /etc/sources.list. – Braiam Sep 26 '13 at 15:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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