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

For many days I was trying to do apt-get update and I used to get a error: could not connect to server. I had thought it must be a issue related to my machine. Later, accidentally, when I copied and pasted a link from the sources file onto browser address bar I found that it was because the resolving of domain names of the repositories for my country was failing. I, painfully, edited the sources.list files on all my 3 machines from in.archive to us.archive. And it worked fine. So, my question is isn't it possible to specify multiple repositories existing is different locations?

share|improve this question
You're not the only one with issues with the Indonesian repo, see this question. I've never had problems with ubuntu's mirrors, multiple repositories are therefore not needed. – Lekensteyn Apr 2 '11 at 14:17
It's Indian repo. – nixnotwin Apr 2 '11 at 15:03
up vote 3 down vote accepted

It is completely possible to specify multiple repositories, for example:

deb natty main restricted
deb natty main restricted

If the same versions of the same packages are found in both listed repositories, apt will download the files from the first listed repository. If the first repository is out of date, and the second has newer files, then apt will pull from the second listed repository. If either of the repositories are down, apt will pull from the repository that remains up.

Note that you will still see complaints in your package managers if either repository is down, although this should not adversely affect your ability to download software unless all repositories are down.

share|improve this answer

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.