Debian Lenny automatic apt updates and downloads
Little known and not terribly documented, but true:
You can tell your Debian machine to do an apt update and and download any files that you might need by adding two lines to your apt config (which I’ll bet you didn’t know you had.)
cat > /etc/apt/apt.conf.d/50autoupdate APT::Periodic::Update-Package-Lists “1”; APT::Periodic::Download-Upgradeable-Packages “1”;
Then the script /etc/cron.daily/apt will keep you all up to date savings you seconds to minutes every time you decide to upgrade.
Acquire::http::Proxy "http://YOURHOST:YOURPORT";
This way you don't have to mess with your /etc/apt/sources.list file to make all the proxy changes.