Post History
On Debian, the package manager can tell the versions of the installed software. Let's say we want to know the version of mbsync(1). Quoting a comment by @matthewsnyder, this is a 3 step process: ...
Answer
#4: Post edited
- On Debian, the package manager can tell the versions of the installed software.
Let's say we want to know the version of *neomutt*(1).- Quoting a comment by @matthewsnyder, this is a 3 step process:
- - Figure out full path of the command
- - Figure out what package owns it
- - Figure out the version of the package
- The 3 steps are shown below:
- ```sh
alx@debian:~$ which neomutt/usr/bin/neomuttalx@debian:~$ which neomutt | xargs dpkg -Sneomutt: /usr/bin/neomuttalx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d:neomuttalx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d: | xargs dpkg -l- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description+++-==============-=================-============-===========================================================ii neomutt 20240329+dfsg-0.2 amd64 command line mail reader based on Mutt, with added features- ++++-==============-============-============-=====================================
- ```
- ---
Let's do the same with mbsync(1):- `which mbsync` tells the full path of the binary.
- `... | xargs dpkg -S` (i.e., `dpkg -S /usr/bin/mbsync`) tells you the package that provides the file.
- `... | cut -f1 -d:` extracts the package name alone.
- `... | xargs dpkg -l` (i.e., `dpkg -l isync`) tells you the info about the isync package.
- ---
- However, if you didn't install the program with the package manager, obviously this won't help.
- Other package managers for other OSes will have similar features.
- On Debian, the package manager can tell the versions of the installed software.
- Let's say we want to know the version of *mbsync*(1).
- Quoting a comment by @matthewsnyder, this is a 3 step process:
- - Figure out full path of the command
- - Figure out what package owns it
- - Figure out the version of the package
- The 3 steps are shown below:
- ```sh
- alx@debian:~$ which mbsync
- /usr/bin/mbsync
- alx@debian:~$ which mbsync | xargs dpkg -S
- isync: /usr/bin/mbsync
- alx@debian:~$ which mbsync | xargs dpkg -S | cut -f1 -d:
- isync
- alx@debian:~$ which mbsync | xargs dpkg -S | cut -f1 -d: | xargs dpkg -l
- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
- ||/ Name Version Architecture Description
- ++++-==============-============-============-=====================================
- ii isync 1.4.4-5+b1 amd64 IMAP and MailDir mailbox synchronizer
- ```
- ---
- Let's explain the steps:
- `which mbsync` tells the full path of the binary.
- `... | xargs dpkg -S` (i.e., `dpkg -S /usr/bin/mbsync`) tells you the package that provides the file.
- `... | cut -f1 -d:` extracts the package name alone.
- `... | xargs dpkg -l` (i.e., `dpkg -l isync`) tells you the info about the isync package.
- ---
- However, if you didn't install the program with the package manager, obviously this won't help.
- Other package managers for other OSes will have similar features.
#3: Post edited
- On Debian, the package manager can tell the versions of the installed software.
- Let's say we want to know the version of *neomutt*(1).
- Quoting a comment by @matthewsnyder, this is a 3 step process:
- - Figure out full path of the command
- - Figure out what package owns it
- - Figure out the version of the package
- The 3 steps are shown below:
- ```sh
- alx@debian:~$ which neomutt
- /usr/bin/neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S
- neomutt: /usr/bin/neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d:
- neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d: | xargs dpkg -l
- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
- ||/ Name Version Architecture Description
- +++-==============-=================-============-===========================================================
- ii neomutt 20240329+dfsg-0.2 amd64 command line mail reader based on Mutt, with added features
- ```
- However, if you didn't install the program with the package manager, obviously this won't help.
- Other package managers for other OSes will have similar features.
- On Debian, the package manager can tell the versions of the installed software.
- Let's say we want to know the version of *neomutt*(1).
- Quoting a comment by @matthewsnyder, this is a 3 step process:
- - Figure out full path of the command
- - Figure out what package owns it
- - Figure out the version of the package
- The 3 steps are shown below:
- ```sh
- alx@debian:~$ which neomutt
- /usr/bin/neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S
- neomutt: /usr/bin/neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d:
- neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d: | xargs dpkg -l
- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
- ||/ Name Version Architecture Description
- +++-==============-=================-============-===========================================================
- ii neomutt 20240329+dfsg-0.2 amd64 command line mail reader based on Mutt, with added features
- ```
- ---
- Let's do the same with mbsync(1):
- `which mbsync` tells the full path of the binary.
- `... | xargs dpkg -S` (i.e., `dpkg -S /usr/bin/mbsync`) tells you the package that provides the file.
- `... | cut -f1 -d:` extracts the package name alone.
- `... | xargs dpkg -l` (i.e., `dpkg -l isync`) tells you the info about the isync package.
- ---
- However, if you didn't install the program with the package manager, obviously this won't help.
- Other package managers for other OSes will have similar features.
#2: Post edited
- On Debian, the package manager can tell the versions of the installed software.
Let's say we want to know the version of *neomutt*(1):- ```sh
- alx@debian:~$ which neomutt
- /usr/bin/neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S
- neomutt: /usr/bin/neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d:
- neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d: | xargs dpkg -l
- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
- ||/ Name Version Architecture Description
- +++-==============-=================-============-===========================================================
- ii neomutt 20240329+dfsg-0.2 amd64 command line mail reader based on Mutt, with added features
- ```
- However, if you didn't install the program with the package manager, obviously this won't help.
- Other package managers for other OSes will have similar features.
- On Debian, the package manager can tell the versions of the installed software.
- Let's say we want to know the version of *neomutt*(1).
- Quoting a comment by @matthewsnyder, this is a 3 step process:
- - Figure out full path of the command
- - Figure out what package owns it
- - Figure out the version of the package
- The 3 steps are shown below:
- ```sh
- alx@debian:~$ which neomutt
- /usr/bin/neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S
- neomutt: /usr/bin/neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d:
- neomutt
- alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d: | xargs dpkg -l
- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
- ||/ Name Version Architecture Description
- +++-==============-=================-============-===========================================================
- ii neomutt 20240329+dfsg-0.2 amd64 command line mail reader based on Mutt, with added features
- ```
- However, if you didn't install the program with the package manager, obviously this won't help.
- Other package managers for other OSes will have similar features.
#1: Initial revision
On Debian, the package manager can tell the versions of the installed software. Let's say we want to know the version of *neomutt*(1): ```sh alx@debian:~$ which neomutt /usr/bin/neomutt alx@debian:~$ which neomutt | xargs dpkg -S neomutt: /usr/bin/neomutt alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d: neomutt alx@debian:~$ which neomutt | xargs dpkg -S | cut -f1 -d: | xargs dpkg -l Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-=================-============-=========================================================== ii neomutt 20240329+dfsg-0.2 amd64 command line mail reader based on Mutt, with added features ``` However, if you didn't install the program with the package manager, obviously this won't help. Other package managers for other OSes will have similar features.