Ubuntu: Where is .deb package location after I run apt dist-upgrade on Ubuntu 16.04 LTS?


I am using Xubuntu 16.04 LTS.

When I run sudo apt-get dist-upgrade in the Terminal there isn't any problem.

After that, I want to copy the .deb file in /var/cache/apt/archives/ using Thunar file manager, but it doesn't exist.

See screenshot below:

enter image description here

But the locate command finds it:

enter image description here

The summary, file .deb is there in /var/cache/apt/archives/

I am confused, what’s wrong with my system? Could you help about this problem, please?


The reason why you can't find the .deb file in the /var/cache/apt/archives/ directory is because it isn't there anymore.

The locate command finds it because locate does not look at the actual directory contents but works from a cache.

From man locate:

locate reads one or more databases prepared by updatedb(8) and writes file names matching at least one of the PATTERNs to standard output, one per line.

By default, locate does not check whether files found in database still exist (but it does require all parent directories to exist if the database was built with --require-visibility no). locate can never report files created after the most recent update of the relevant data‐base.

To update the database cache, run this command:

sudo updatedb  

updatedb creates or updates a database used by locate(1). If the database already exists, its data is reused to avoid rereading directories that have not changed.

This should sort out the locate command finding files that no longer exist.


For the /var/cache/apt/archives/ files not existing, maybe you run a clean command after running the sudo apt-get dist upgrade command.

Any of these commands will automatically clean out the /var/cache/apt/archives/ directory.

sudo apt-get clean  sudo apt-get autoclean  

Source: Cleaning out var/cache/apt

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »