9

Imagine, I have all packages to install, say, ddd.
If I copy all ddd packages to /var/cache/apt/archives and run sudo apt-get install ddd in terminal, will apt-get re-download the packages or skip them?

PS I currently have ddd installed, so I can't (won't) test it myself. So I need some expert to tell me what would happen :)

2
  • i didn't find any /var/apt/cache. Feb 21, 2014 at 12:29
  • which type of packages you had .deb or tar.gz? Feb 21, 2014 at 12:38

2 Answers 2

7

Yes it will, but only if the package is part of any lists that where downloaded while doing a apt-get update, eg:

  • You get a package that comes from a PPA that you want to use and you add the package manually to /var/cache/apt/archives, because the version of the package is not present on any package list from your sources it will not be used.

Packages are also signed, so if the signature from the package does not match the expected signature then it will be downloaded again, package identification does not depend on the name of the file only.

Making it short: if the manually added package version and signature match anything in your sources package list then that package will be used, else it will be downloaded again.

5

No , It would not download it again. Here I am installing a previously uninstalled package which is present in my /var/cache/apt/archives directory.

sudo apt-get install artha

enter image description here

4
  • This is not conclusive unless you manually copied the file there and there was no earlier presence of artha on the system.
    – Requist
    Feb 21, 2014 at 12:44
  • As I assume uninstalling a package also means the same .
    – g_p
    Feb 21, 2014 at 12:51
  • You assume there is no mention anywhere else? But I have verified this by manually getting a package from Ubuntu and adding it to the cache before install. So now for sure, it will not download the file again.
    – Requist
    Feb 21, 2014 at 12:55
  • @guruprasad I would select your answer as accepted, but Bruno Pereira's answer is more detailed. Anyway thanks, and +1 for great answer and a great wallpaper :) Feb 21, 2014 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .