24

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

1 Answers1

28

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.

jobin
  • 28,567