15

I am trying to copy all of the packages I have installed on one Debian machine to another Debian machine without doing another apt-get install and downloading all of the package all over again.

studiohack
  • 13,477
superuser
  • 4,247

4 Answers4

23

They're stored in:

/var/cache/apt/archives/

unless you've issued a:

apt-get clean
cYrus
  • 22,335
7

Maybe you just need:

apt-get download mypackage1 mypackage2

it will download given *.deb files to the current directory. No need for root.

1

If you had already issued

apt-get clean

you can take a look at these pages to learn about replicating the same package configuration on the other machine

Glorfindel
  • 4,158
0

You can also create a package proxy, we use approx

Then the real repository servers are specified in the approx.conf, like:

debian         http://ftp.debian.org/debian
security       http://security.debian.org/debian-security
volatile       http://volatile.debian.org/debian-volatile

In all machines you want to install just place the following to /etc/apt/sources.list:

deb http://<hostname>:9999/debian/ squeeze main contrib non-free
deb http://<hostname>:9999/security/ squeeze/updates main contrib non-free
etc.

When first machine is downloading the packages, they go from the internet and are stored in the cache of approx. All other machines download the packages from the cache directly.

SkyRaT
  • 504