If you have some Debian machines already installed, and you plan to install some others, you maybe are going to use the net-install CD, which is the most common way to install Debian.

That may take a long time, to install all the Desktop Gnome or KDE, all the applications or servers, etc, and if you have just installed your apt-cacher server as me, you will not be able to use it this first time …. unless you populate it.

Usually at nights you are not working and your bandwidth is wasted, so at night you can enter this command to one or more Debian machines, (all pointed to the apt-cacher server see how to install apt-cacher).

for pkg in `dpkg --get-selections | awk '{print $1}'`; do sudo aptitude download $pkg; sudo rm $pkg; done

and you will have your machines downloading all its installed packages, and thus populating the apt-cacher database.

Be sure to have issued

sudo aptitude update && sudo aptitude safe-upgrade

in those machines before, so they download the latest versions of the packages, according to the manual this is not needed but I prefer to be sure.

Now, when the bid day arrives and you need to install that new Debian machine, you will have almost all the needed packages already in your proxy disk, and will waste not time.