How can I add previously downloaded .deb files to apt using command line so that they will not be downloaded again when I use sudo apt-get install?

1 Answer 1


Copy it to /var/cache/apt/archives with the following command:

sudo cp filename.deb /var/cache/apt/archives/

You may have to rename the deb files according to the cache, so start to download it with apt-get, get the name of the cached file from /var/cache/apt/archives/ then rename your file and copy it there overwriting the incomplete download and start apt-get again.

Of course you don't need this if you are copying from an old cache :)

  • Does copying to /var/cache/apt/archives/ means that they are recognized?
    – user69453
    Jun 19, 2014 at 11:15
  • @user69453 Yes, it is where apt-get stores its cache, so if you copy your deb file with the correct filename it should install it instead of downloading it again.
    – nastys
    Jun 19, 2014 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.