How to find out what is installed in the package.deb via the command line? I'm trying to figure out if some daemon or service was installed along with the package. What command can I use to find out?


3 Answers 3


You can use dpkg to view a deb file

dpkg --info /path/file.deb

to get general information, and

dpkg --contents /path/file.deb

to get the files (programs, libraries, documents etc) listed:

Edit: You can also view a deb file with emacs

emacs /path/file.deb

and that way get into the different parts of the deb file

Example from ppa:mkusb/unstable which I am developing. The following command

emacs dus_22.0.7-1ubuntu1_all.deb

brings you to a table

   Mode    User/Group   Size        Date       Filename
--------- -----/-----  ----- ---------------- ----------------
rw-r--r--     0/0          4 2022-06-03 17:03 debian-binary
rw-r--r--     0/0       1420 2022-06-03 17:03 control.tar.xz
rw-r--r--     0/0      58968 2022-06-03 17:03 data.tar.xz
--------- -----/-----  ----- ---------------- ----------------

You can enter the control tarball to see the same as dpkg --info and enter the data tarball to see the same as dpkg --contents and furthermore very conveniently enter each of the files if they are possible to read (and most of the dus files are bash shellscripts).

Edit 2: Install package from deb file

The command line

sudo dpkg -i package.deb

should install package and make its program(s) available like other programs, if that is what you want.


Rather than look at deb files looking for a program (gpsd in below example), you can run:

apt-file search bin/gpsd

and get the list of packages containing your daemon.

First you would install apt-file

sudo apt-get install apt-file

Then update

sudo apt-file update

Then searches will work, even on non-installed debs.


List what files belong to a package:

dpkg -L packagename

and soon you will want the reverse command too, how to see to which package a file belongs to (if any):

dpkg -S /my/path/somefile

Both commands work only for packages which are already installed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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