After installing apps via apt-get install -app name-. Where does the files get copied to? Are the copied to just one location or multiple locations? And if so how do I find this out?

Here's an example:

enter image description here


2 Answers 2


Ask the package management what files the package contains:

dpkg -L <packagename>

This shows the files simply copied to those locations. These files are marked as managed by the package management, so don't touch them.

Additionally, sometimes some files are created/modified by pre-/postinstall and pre-/postrm scripts included in the package. You can find the scripts in /var/lib/dpkg/info/ once the package is installed.

  • That did nothing interesting except tell me which command did do something interesting: dpkg --contents.
    – ijoseph
    Nov 27 at 22:42

Linux uses several directories and where stuff goes is explained here: How to understand the Ubuntu file system layout?

In general: software from the normal installations gets installed in such a manner that the same files (ie. libraries) use the same file and not install their own version of that file.

If you want to know specifics of that package in your image see: http://packages.ubuntu.com/en/saucy/all/ack-grep/filelist for an on-line reference. Someone else will post the dpkg version to do this locally ;)

From the link it states that these are the files:


The executable is /usr/bin/ack-grep

Not the answer you're looking for? Browse other questions tagged or ask your own question.