A Detailed Look at Where deb Packages Are Installed
Which directory are the files of software installed on a Linux system actually placed in? This article gives a brief introduction using dpkg.
- Ryan
- 1 min read

As everyone knows, when you install software on Windows, most of the files of that package are usually kept in the installation directory. But when you first install a package on Linux, you often wonder: where exactly are the package’s files stored?
Actually, when you install a package on Linux, the system copies different types of files from the package to different directories. If you’re using a Debian-based Linux system, you can find out which directories the different types of files of a package go to with the following command. For example, to see the distribution of all of nodejs’s files:
# dpkg -L nodejs
The output is as follows:
/. /usr /usr/share /usr/share/doc /usr/share/doc/nodejs /usr/share/doc/nodejs/changelog.Debian.gz /usr/share/doc/nodejs/api /usr/share/doc/nodejs/api/assets /usr/share/doc/nodejs/api/assets/style.css /usr/share/doc/nodejs/api/assets/sh.css /usr/share/doc/nodejs/api/https.markdown.gz /usr/share/doc/nodejs/api/events.markdown /usr/share/doc/nodejs/api/punycode.markdown …omitted
We can see that nodejs’s files roughly fall into the following categories:
/usr/share/doc/nodejs/ Stores nodejs-related documentation.
/usr/share/man/man1/nodejs.1.gz Stores the man-page help manual related to nodejs.
/usr/lib/nodejs/ Stores nodejs-related library files.
/usr/bin/nodejs The nodejs executable.