Create a cacher for APT with apt-cacher.


September 2010.

apt-get install apt-cacher

In sources.list:

#repository:
deb http://example.debian.org/debian unstable main contrib non-free
#becomes:
deb http://repository-cache:3142/example.debian.org/debian unstable main contrib non-free

Or in apt.conf:

#Use cache:
Acquire::http::Proxy "http://repository-cache:3142/";
#Don't use cache for security.ubuntu.com
Acquire::http::Proxy::security.ubuntu.com "DIRECT";

Check it with:

apt-config dump

Sources: