Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I know when you want to Install any new pkg then internet connection is required .right now I am using Ubuntu 12.04

I have Internet connection. using following command I installed one pkg.(e.g vlc player)

 $sudo apt-get install vlc

Installed successfully.

after that I remove/purge pkg then internet connection disconnect and tired installing same pkg again using

 $sudo apt-get install vlc  

Installed successfully.

so my question is when you install any pkg that time internet is required but for this scenario why not required? any concept behind that? I searched on Google but not getting specific answer.

share|improve this question
up vote 5 down vote accepted

All downloaded packages are cached in /var/cache/apt/archives/ directory. You can

$ sudo apt-get clean

clean clears out the local repository of retrieved package files. It removes everything except the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.

share|improve this answer

Since all packages are downloaded to /var/cache/apt/archives, and no newer version of same software was provided, you don't need to download them again.

So installation continues, and skip the download part

share|improve this answer

The apt system downloads all packages to a cache (/var/cache/apt/) before they get installed. The installation itself only needs these files, so if you already downloaded the vlc package there's no need to download it again.

You can clean the cache with apt-get clean or aptitude clean, and if you try to reinstall the package you'll see that apt has to download the .deb again...

share|improve this answer

Downloaded packages are stored in /var/cache/apt/archives/. If you want to install the same version again, no network connection is required. Over time this cache can grow very large, so you should call apt-get clean or apt-get autoclean from time to time.

share|improve this answer

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.