When you do "apt-get install" where are the .deb files stored?

23,748

Solution 1

They're stored in:

/var/cache/apt/archives/

unless you've issued a:

apt-get clean

Solution 2

Maybe you just need:

apt-get download mypackage1 mypackage2

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

Solution 3

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

Share:
23,748

Related videos on Youtube

superuser
Author by

superuser

Updated on September 18, 2022

Comments

  • superuser
    superuser over 1 year

    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.

  • superuser
    superuser over 12 years
    Thank you so much! So, let's say if I copied the files to another machines, what's the easiest way to install all of them?
  • cYrus
    cYrus over 12 years
    Assuming that all the dependencies are satisfied: dpkg -i *.deb.
  • SkyRaT
    SkyRaT about 9 years
    This is just fine, manual way, well doable on dislocated systems, e.g. without network connection. If the machines are connected (mostly preferred on local network) there are more convenient automatic ways to achieve this, see my answer below about apt proxy.
  • Mark Ch
    Mark Ch over 8 years
    both links are now gone, any other source for the info?