Unlike the previous technique no special configuration files are required. We merely use the standard APT commands to generate the file list.
# apt-get dist-upgrade [ Press no when prompted, make sure you are happy with the actions ] # apt-get -qq --print-uris dist-upgrade > uris # awk '{print "wget -O " $2 " " $1}' < uris > /disc/wget-script
Any command other than dist-upgrade could be used here, including dselect-upgrade.
The /disc/wget-script file will now contain a list of wget commands to execute in order to fetch the necessary archives. This script should be run with the current directory as the disc's mount point so as to save the output on the disc.
The remote machine would do something like
# cd /disc # sh -x ./wget-script [ wait.. ]
Once the archives are downloaded and the disc returned to the Debian machine installation can proceed using,
# apt-get -o dir::cache::archives="/disc/" dist-upgrade
Which will use the already fetched archives on the disc.