This question already has an answer here:
Please answer as generally as possible, but here is the exact problem:
Ubuntu: packagename: gnupg2 executable: gpg version: 2.1.18 Debian: packagename: gnupg executable: gpg version: 1.4.20
How to get gpg (or gpg1 / gpg2) from gnupg (or gnupg1 / gnupg2) This issue is because I'm writing something for debian and also ubuntu. (or other systems). I din't found it in neither dpkg or apt-cache. Maybe some special magic words???
dpkg -L is a good answer, thank you @PerlDuck, but as @cmak.fr mentioned, I would like to get main executable file name. Do you know simple way how to select (grep) the main one? I could use:
dpkg -L gnupg | egrep '\/gpg$|\/gpg$' | egrep -o 'gpg$|gpg$'
But it's only for case when I know possible names (fortunately, you usually know them).