How to Check Version of a Package Installed on Linux?

2014-03-01 Linux

Sometimes you will have to check which version of currently installed package you have. In various distributions of Linux you can achieve this in the same way. Ubuntu will be an example. To get this information, simply open terminal and type this command:

dpkg -s <name_of_package_you_want_to_check>

As an example I will check which version of Midnight Commander I have:

dpks -s mc

As a result you should see something similar to:

Package: mc
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 1385
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Version: 3:4.8.5-1
Depends: e2fslibs (>= 1.42.2), libc6 (>= 2.15), libglib2.0-0 (>= 2.35.9), libgpm2 (>= 1.20.4), libslang2 (>= 2.2.4), libssh2-1 (>= 1.2.5), mc-data (= 3:4.8.5-1)
Recommends: mime-support, perl, unzip
Suggests: arj, bzip2, catdvi | texlive-binaries, dbview, djvulibre-bin, file, genisoimage, gv, imagemagick, links | w3m | lynx, odt2txt, poppler-utils, python, python-boto, python-tz, xpdf | pdf-viewer, zip
 /etc/mc/sfs.ini 316dc92f3fdec60a7aaf0866edc361db
 /etc/mc/mc.keymap.emacs 5baed588e23bd501eb5655307db2a036
 /etc/mc/mc.keymap a7d3ffbc32c3ea4cd85bf4be1b821fe9
 /etc/mc/filehighlight.ini 481f6221aa3630a9a9dc1d5ca014400c
 /etc/mc/mc.keymap.default a7d3ffbc32c3ea4cd85bf4be1b821fe9
 /etc/mc/edit.indent.rc 008c6d0205315a87a977c7cd74a1526e
 /etc/mc/ ee4162e45f2bf4a9d6ba22cb6506431e
 /etc/mc/ a6230547b1f483426224145b88645427
 /etc/mc/mc.ext 0805465f268279864c8bdf3b3e620d64
 /etc/mc/ 748c8e1b5bf3885075f282e301b7211f
Description: Midnight Commander - a powerful file manager
 GNU Midnight Commander is a text-mode full-screen file manager. It
 uses a two panel interface and a subshell for command execution. It
 includes an internal editor with syntax highlighting and an internal
 viewer with support for binary files. Also included is Virtual
 Filesystem (VFS), that allows files on remote systems (e.g. FTP, SSH
 servers) and files inside archives to be manipulated like real files.
Original-Maintainer: Debian MC Packaging Group <[email protected]>

In this case:

Version: 3:4.8.5-1

is the answer.

Do NOT follow this link or you will be banned from the site!