I have several 3rd party repos in /etc/apt/sources.list.d/*
, including for apt "foobaz
", which is installed. I want to check which repository foobaz
came from, or could come from:
figure out what package:
$ which foobaz
/usr/bin/foobaz
$ # FWIW - apt-file does not find anything for this, whereas dpkg-S does (and is limited to just my system, unlike apt-file afaict.
$ dpkg -S /usr/bin/foobaz
foobaz
check which version would be preferred in an upgrade
$ sudo apt update
$ apt policy foobaz
*** 3.1.0-1 500
500 https://repo.foobaz.com/debian stable/main all Packages
100 /var/lib/dpkg/status
3.0.0-1 500
500 https://repo.foobaz.com/debian stable/main all Packages
...
but, why is the foobaz
repository not listed here?
$ sudo add-apt-repository --list | grep foobaz
$ # nothing
$ ls -al /etc/apt/sources.list.d/ | grep foobaz
-rw-r--r-- 1 root root 161 Aug 11 16:52 foobaz-stable.list
$ cat /etc/apt/sources.list.d/foobaz-stable.list
deb [arch="all", signed-by=/usr/share/keyrings/foobaz-stable-archive-keyring.gpg] https://repo.foobaz.com/debian stable main
XY
: what command should I be using on ubuntu/debian to:
- ascertain which repositories contain the given package (what I'm doing above - a question in it's own right)?
- specifically, tell me as quickly/easily (and 100% robustly) from what repository a given executable file on my box came?