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

When we install a package in Ubuntu using apt-get install, where can we find the .deb files ?

I installed Python using this method but I did not find its .deb file in /var/cache/apt/archive/.

share|improve this question
1  
Are you sure you installed it? Python should be included by default and only packages you installed manually will be in /var/cache/apt/archive/. – terdon Apr 2 '14 at 16:21
    
Yes, it is included by default, but I installed an other version of it – user284234 Apr 3 '14 at 7:23
up vote 7 down vote accepted

By default, apt stores the .deb files in /var/cache/apt/archives. If you can't find them here, you or someone else or something else(a software like Ubuntu tweak) may have run a clean-up command like sudo apt-get clean to clear up the .deb files. However, you can manually search all .deb files in your system by doing the following(may require superuser privileges):

sudo updatedb

This will update locate's database to search for newly created/removed files, this may take a while depending upon the difference in time when the last time updatedb was run(it is usually run as a cron job daily) and then

locate *.deb

which will search your / folder recursively for all files ending with .deb.

share|improve this answer
    
Thank you Jobin. Yes, I performed the clean several times, indeed before I searched for the .deb file – user284234 Apr 3 '14 at 7:25

Your Answer

 
discard

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