How do I find the files installed by a particular package? Where is the .deb file to look at?

I have installed pulseaudio-module-bluetooth using apt.

$ type pulseaudio-module-bluetooth
bash: type: pulseaudio-module-bluetooth: not found
$ which pulseaudio-module-bluetooth
$ whereis pulseaudio-module-bluetooth
pulseaudio-module-bluetooth:

Clearly, I’m looking for the wrong thing. The package does not simply install a command that is the same name as the package. Alright, then.

I want to find out what all commands (or executables) this package installed, and their locations.

The answers to “How to get information about deb package archive?” tell me how to find the files installed by the package if I have a .deb file. I’m not installing directly from a .deb file, though. I’m using apt. Where is the .deb file that that used? Is there a copy on my system somewhere that I can query with the commands in the answers to that question? Where?

If there isn’t a local copy on my system, can I get one with apt? How?

Is there some handy apt (or similar) command that wraps this up for me, so that I do not have to run dpkg-deb directly? What is it?

Can I find the package’s file list entirely on-line, without explicitly downloading any .deb files and before installing anything with apt? How?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

I think there is an existing answer to your question (which isn’t How to get information about deb package archive?), but I can’t find it.

To list the contents of an installed package, use dpkg -L:

dpkg -L pulseaudio-module-bluetooth

If you want to list the contents of a package before installing it, install apt-file, then run apt update, and

apt-file list pulseaudio-module-bluetooth

will list the contents of the package without downloading it or installing it.

You can also view the contents of a package from its web page; look for “list of files” links at the bottom of the page.

Method 2

There is a few approaches here. One of easiest is to download specific package:

cd /tmp/ && apt download pulseaudio-module-bluetooth

and list package content by:

dpkg -c pulseaudio-module-bluetooth-{version_stuff}.deb |grep bin

Method 3

You asked

I want to find out what all commands (or executables) this package
installed, and their locations.

I found this answer from member Evo2 over at linuxquestions.com where he mentions a nice utility called dlocate. dlocate has a nice “-lsbin” option which does exactly that. Since you mention apt I presume you are using a debian derivative, so dlocate should be available for your distro.

For example, if I want to find all executables shipped with libreoffice7.0 I’d do :

root#ychaouche-PC 14:15:15 /opt # dlocate -lsbin libreoffice7.0
/opt/libreoffice7.0/program/minidump_upload
/opt/libreoffice7.0/program/oosplash
/opt/libreoffice7.0/program/soffice
/opt/libreoffice7.0/program/soffice.bin
/opt/libreoffice7.0/program/unoinfo
/opt/libreoffice7.0/program/unopkg
/opt/libreoffice7.0/program/unopkg.bin
root#ychaouche-PC 14:19:44 /opt #

Please bare in mind that you need to do an update-dlocate in order for dlocate to work properly.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x