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

During system installation from a Desktop LiveCD (10.10) I checked the "Download updates during installation" option.

Before starting the install I had configured an apt proxy server.

The proxy server was configured by writing

Acquire::http { Proxy "http://apt-proxy-server:3142"; };

to the new file /etc/apt/apt.conf.d/02proxy on the running system booted from the LiveCD.

This proxy was used correctly for my various package installs on the live system prior to launching the system installation GUI. It accesses apt-cacher-ng running in non-transparent mode on the machine apt-proxy-server.

However, the downloads taking place during the installation are not using this proxy. I verified that the file 02proxy had not been changed or removed.

Is there a way to force usage of an APT proxy during installation?

share|improve this question
possible duplicate of apt-get does not work with proxy – Jorge Castro Feb 27 '12 at 22:36
Since it uses the apt installed in /target, the only way I found was to manually set that proxy on /target/etc/apt/apt.conf.d as soon as the file copy has begun. Hackish, but it works. – Treviño Apr 19 '14 at 10:31

If you are using the Live CD, Apt is not set to use your proxy, you may be able to configure apt on the live CD to use the proxy. If you want to make this more permanent you could use a custom live CD or set your network to use the proxy by default for all connections.

personally I just use squid and cache all .deb files for about a month

from ubuntu help

Updating clients to use your proxy server apt clients need the /etc/apt/sources.list file to be reconfigured to point to the new apt-proxy server instead of the outside world. Configuration of the sources.list file looks similar to the config for normal apt repositories with the exception that the backend section has to be appended to the path:

example of changes

deb http://apt-proxy:port/backend dist component Replace mentions of specific repository URL with references to your server and the backend for it; such as:

deb dapper main restricted

deb dapper-security main restricted universe

would become

deb http://server:9999/ubuntu dapper main restricted

deb http://server:9999/ubuntu-security dapper-security main restricted universe

A sources.list corresponding to the apt-proxy-v2.conf above may look like this:

apt-proxy entries for standard modules

deb http://localhost:9999/ubuntu dapper main restricted universe multiverse

deb-src http://localhost:9999/ubuntu dapper main restricted universe multiverse

apt-proxy entries for security patches

deb http://localhost:9999/ubuntu-security dapper-security main restricted universe multiverse

deb-src http://localhost:9999/ubuntu-security dapper-security main restricted universe multiverse
share|improve this answer
I've added more info to the question explaining how I configured the running livecd boot to use the proxy server. Are you saying that changing sources.list will work even though the APT proxy settings are being ignored by the installation program? – intuited Feb 16 '11 at 15:41
Also: the squid approach is appealing, thanks for the idea. I was trying to figure out how to get my router to relay requests to a debian-ish machine, since it looks like there is no /apt-(cacher(-ng)?|proxy)/ package available for openwrt. But your way is much simpler. Though it does mean that all of the squidded machines will have to be pointing at the same ubuntu repo. apt-cacher-ng will remap URLs from whatever repo is being used by the client to the one you configure it to use. . . . . . . Still doesn't really answer my question, though :) – intuited Feb 17 '11 at 2:07
the source list from what I understand has to point to the proxy server on the client This will force it to use only the proxy. an example would be this "deb dapper main restricted " to "deb server:9999/ubuntu dapper main restricted" ---updated answer to include quote – jsolarski Feb 17 '11 at 2:59
as for the squid, I use it as a transparent caching proxy, all network traffic goes through that one PC, I have it set so DHCP sets all the PCs to my proxy as there gateway, no client side config for me. – jsolarski Feb 17 '11 at 4:18

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.