Problem:
I want to list all executables installed via apt (or apt-get). I know the name of the package installed and I am already comfortable with using shell commands.
Solution:
To list all executables installed for a package, in your shell use the following command while replacing "packagename" with the actual package name:
dpkg -L packagename | xargs file | grep executable
Example:
For example, if I want to list all executables installed in the package "nullmailer":
dpkg -L nullmailer | xargs file | grep executable
Other reminders:
To list all files installed for a package, in your shell and replacing "packagename" with your package name, use:
dpkg -L packagename
To list all executables for a package (named "packagename") installed in the "opt" folder, use:
dpkg -L packagename | xargs file | grep ^/opt | grep executable