Sometimes it’s necessary to download a Debian package from a repository without actually intsalling or reinstalling it.
# apt-get -d --reinstall -o=dir::cache=/tmp install rssh Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: cvs rdist subversion makejail The following NEW packages will be installed: rssh 0 upgraded, 1 newly installed, 0 to remove and 102 not upgraded. Need to get 59.4 kB of archives. After this operation, 225 kB of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian/ squeeze/main rssh i386 2.3.2-13squeeze3 [59.4 kB] Fetched 59.4 kB in 0s (178 kB/s) Download complete and in download only mode #
This downloaded the rssh .deb package to /tmp/archives without reinstalling over the existing version.
# ls -l /tmp/archives total 64 -rw-r----- 1 root root 0 Jun 5 09:05 lock drwxr-xr-x 2 root root 4096 Jun 5 09:05 partial -rw-r--r-- 1 root root 59428 Nov 27 2012 rssh_2.3.2-13squeeze3_i386.deb