Debian: Download all dependancies using apt-get

Debian: Download all dependancies using apt-get

I manage from time to time servers that are sat in a pretty restricted DMZ and when I need to download and install packages I tend to have to download them on another machine first and then perform the installation on the hosts that need the packages. So below is a small snippet that I use to download the package and all of its dependencies ready to transferred to the server that they will be installed on

aptitude clean
aptitude --download-only install <your_package_here>
cp /var/cache/apt/archives/*.deb <your_directory_here>

 

Advertisements