Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 would apt-get download the packages or skip them.

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

share|improve this question
    
i didn't find any /var/apt/cache. –  Avinash Raj Feb 21 at 12:29
    
which type of packages you had .deb or tar.gz? –  Avinash Raj Feb 21 at 12:38
add comment

2 Answers

up vote 7 down vote accepted

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.

share|improve this answer
add comment

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

share|improve this answer
    
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 at 12:44
    
As I assume uninstalling a package also means the same . –  Guru Feb 21 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 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 :) –  Sylap Aliyev Feb 21 at 13:14
add comment

Your Answer

 
discard

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.