I have installed a particular program via apt.  It originates from a 3rd party repo, and I have 100% confidence the file was installed & updated via apt not some other path (per data I list below)
I have stripped the specific package name because I would like to know (A) do I understand dpkg --search capabilities correctly, and (B) faced with an unknown-to-dpkg file, how do I definitively figure out where it came from?
$ which -a foobaz
/usr/bin/foobaz
/bin/foobaz
These^ are distinct but identical:
- files exist
- neither are symlinks (test -L $filefails) OR hardlinkes (stat -c %h -- $fileprints1)
- have the same ctimeandmtime- note the package has been updated recently, all the times^ look correct to me.
 
- have identical sha1sumhashes
but dpkg only seems to know about the first one?
$ dpkg --get-selections  | grep -i foobaz
foobaz              install
$ dpkg-query -S /usr/bin/foobaz 
foobaz: /usr/bin/foobaz
dpkg-query -S /bin/foobaz 
dpkg-query: no path found matching pattern /bin/foobaz
Shouldn't dpkg -S <file> always know about the files added by the debs/apt?  How should I approach this issue to determine where some 'unknown' file originated when I know with high confidence it was installed with apt?
