1

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.

5

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/.

2

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

2

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...

1

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.

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.