Copy .deb files from separate dir to /var/cache/apt/archives

Art Edwards edwardsa at
Mon Oct 30 05:11:41 UTC 2006

Thilo Six wrote:
> OOzy Pal wrote the following on 28.10.2006 20:01:
>> How can I copy a bunch of .deb files from multiple directories to
>> /var/cache/apt/archives in one shot to avoid downloading again.
> e.g. ones i copied the debs from the alternate cd to
> /var/cache/apt/archives. I used:
> sudo cp -v /media/cdrom/pool/*/*/*/*deb /var/cache/apt/archives/
> bye Thilo
I think that may mess up your archive. The deb's will be there, but
unless they are installed using a tool such as apt or aptitude, you can
only deal with them through dpkg.

There is a very nice tool called apt-cacher that creates a cache that
other local machines can pull from. Also, you can copy all the debs you
want to register into /var/cache/apt-cacher/import and use a perl script that comes with apt-cacher to then register them in
your archive. You have to point your sources at the archive. This is all
 explained very nicely in the man page for apt-cacher (probably the
nicest man page I've seen. It includes a FAQ.) Note that you can point
the machine to its own apt-cacher archive first and then out to the
external repositories. I have used this to install two other edgy boxes
and it was about 5-10 times faster.

Art Edwards

More information about the ubuntu-users mailing list