Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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 :)

share|improve this answer
Does copying to /var/cache/apt/archives/ means that they are recognized? – user69453 Jun 19 '14 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 '14 at 11:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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