Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Is it possible to have apt-cacher server for both Ubuntu version 10.04 & 10.10 in one machine? IF yes can someone explain pls.

The first CD cache of Ubuntu 10.10 works fine.

I have imported the second cd cache of Ubuntu version 10.04, and now when i update Ubuntu 10.04 client, I get the following error..

root@TME51:/etc/apt# apt-get update
Err lucid Release.gpg
  Could not connect to ( - connect (111: Connection refused)
Err lucid/main Translation-en_IN
  Unable to connect to
Err lucid/restricted Translation-en_IN
  Unable to connect to
Err lucid/universe Translation-en_IN
  Unable to connect to
Err lucid/multiverse Translation-en_IN
  Unable to connect to
Reading package lists... Done
W: Failed to fetch  Could not connect to ( - connect (111: Connection refused)

W: Failed to fetch  Unable to connect to

W: Failed to fetch  Unable to connect to

W: Failed to fetch  Unable to connect to

W: Failed to fetch  Unable to connect to

W: Some index files failed to download, they have been ignored, or old ones used instead.
share|improve this question
A rather inelegant solution would simply be to run the second OS in VirtualBox on the server you want to cache everything, and install apt-cacher or whatever on it. – zpletan Oct 25 '11 at 11:59

3 Answers 3

up vote 6 down vote accepted


When running multiple machine with the same distribution, it is interesting to set up a repository cache on your network so that once a package is downloaded from an official repository, all other machines will download it from your local area network.

Having different machines running the same linux distribution, it becomes interesting to set up a repository cache somewhere on your network. This way, you won't download common packages more than 1 time from official repositories.

Here is the situation, we have one machine called repository-cache, this machine is going to act as the repository cache, basically, any other machines in your network is going to use it as a repository.

1. How To Set up a repository cache with apt-cacher

How To Set up a repository cache with apt-cacher

2. Conclusion

apt-cacher is an easy and efficient package which will save you both time and bandwidth when using multiple machines with the same distribution like it could happen in a home network or in at a company.


It is a perl-based utility for downloading and mirroring the entire contents of a public repository. This may likely include packages that you don't use and will not use, but anything stored in a public repository will also be stored in your mirror.

1. How To Set up a repository cache with apt-cacher

To configure apt-mirror you will need the following:

apt-mirror package `sudo apt-get install apt-mirror`
apache2 package  `sudo apt-get install apache2`
**roughly 15G of storage per release, per architecture**

How to Set up a repository with apt-mirror

2. Conclusion

I find this difficult but very effective in saving bandwidth but on the other side the results is a high consumption of disk space.


is a caching proxy for downloading packages from Debian-style software repositories (or possibly from other types).

The main principle is that a central machine hosts the proxy for a local network, and clients configure their APT setup to download through it. Apt-Cacher NG keeps a copy of all useful data that passes through it, and when a similar request is made, the cached copy of the data is delivered without being re-downloaded.

Apt-Cacher NG has been designed from scratch as a replacement for apt-cacher, but with a focus on maximizing throughput with low system resource requirements. It can also be used as replacement for apt-proxy and approx with no need to modify clients' sources.list files.

2. Conclusion

is a caching proxy specialized for package files from GNU/Linux distributors, primarily for Debian and Debian based distributions (like Ubuntu). This means that if you have many Debian/Ubuntu machines on your network, you just have to download the deb packages (new software, updates, distro upgrades, etc) from the internet once and the rest of the Debian/Ubuntu machines get them from Apt-Cacher NG cache, saving time and internet bandwidth.

Next time any of your machines needs a deb package, it will ask Apt-Cacher NG for it. If this package was asked previously by any of the other machines, Apt-Cacher will have a copy and will deliver it. Otherwise, it will fetch it from the internet repositories, keep a local copy and deliver it.

Best way to cache apt downloads on a LAN? see Piskvor's answer

Let do it some markeying in Full Circle Issue #54 there is an interesting article about Part 2, Apt-Cache NG

share|improve this answer

Apt-Cacher is a caching proxy. This means it just caches every downloaded package, whether it will be used by Ubuntu 10.04, 10.10 or whatever. There is no need for a special configuration on the server, it just works!

The only thing you have to do is to redirect your clients /etc/apt/sources.list to use it.

Example-line Server A with lucid:

http://your-apt-cacher-server/apt-cacher/ lucid main restricted

Example Server B with natty

http://your-apt-cacher-server/apt-cacher/ natty main restricted

Further info:

Another alternative for apt-cacher:

share|improve this answer
Yeah that is fine. But how to import CD cache? – karthick87 Oct 28 '11 at 16:51

Using apt-cacher-ng could be an alternative. You can find the manual here.

share|improve this answer
I am running apt-cacher-ng with multiple Ubuntu versions using it (including the test virtual machines I use for new versions). No configuration required on the server to support multiple versions and no problems. – Joe P Oct 25 '11 at 19:29

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.