If you were ever curious about how to check and find Installed Packages Version In Linux, then this brief tutorial will help you do so. These days, package management is much better than before with the help of many graphical package managers.
However, the best way to get things done is always the command line way; it is quicker and a lot easier.
There are different commands to see the package version in different versions of Linux.
Check Installed Packages Version In Linux Command
In this tutorial, we will teach you how to find a package version in some popular Linux distributions like Arch Linux and its derivatives, Debian and its derivatives, RHEL, and derivatives.
Find a package version in ARCH based systems.
To find out an installed package (eg. VLC) version in Arch Linux and its derivatives, such as Antergos or Manjaro, execute the command below.
pacman -Q vlc
As you can see in the output above, the installed version of VLC package is 2.2.4-3.
To see more details about the package, execute the following.
pacman -Qi vlc
Name : vlc Version : 2.2.4-3 Description : A multi-platform MPEG, VCD/DVD, and DivX player Architecture : x86_64 URL : http://www.videolan.org/vlc/ Licenses : LGPL2.1 GPL2 Groups : None Provides : None Depends On : a52dec libdvbpsi libxpm libdca libproxy sdl_image libdvdnav libtiger lua libmatroska zvbi taglib libmpcdec ffmpeg2.8 faad2 libupnp libshout libmad libmpeg2 xcb-util-keysyms libtar libxinerama Optional Deps : avahi: for service discovery using bonjour protocol [installed] libnotify: for notification plugin [installed] gtk2: for notify plugin [installed] [...] lua-socket: for http interface qt4: for the GUI [installed] Required By : None Optional For : smtube Conflicts With : vlc-plugin Replaces : vlc-plugin Installed Size : 53.28 MiB Packager : Antonio Rojas <[email protected]> Build Date : Sun 24 Jul 2016 03:12:59 PM IST Install Date : Fri 05 Aug 2016 11:22:54 AM IST Install Reason : Explicitly installed Install Script : No Validated By : Signature
The command above will show the complete details including package description, the version, build date, install date, and package owner as well as more.
Find a package version in DEB based systems.
In Debian, Ubuntu, and derivatives such as Linux Mint or Elementary OS, you will be able to find the installed package version, like Apache webserver, by running the command below.
dpkg -s apache2 | grep -i version
To see more details about an installed package, execute the following.
dpkg -s apache2
Package: apache2 Status: install ok installed Priority: optional Section: httpd Installed-Size: 488 Maintainer: Ubuntu Developers <[email protected]> Architecture: amd64 Version: 2.4.18-2ubuntu3.1 Replaces: apache2.2-bin, apache2.2-common Provides: httpd, httpd-cgi Depends: lsb-base, procps, perl, mime-support, apache2-bin (= 2.4.18-2ubuntu3.1), apache2-utils (>= 2.4), apache2-data (= 2.4.18-2ubuntu3.1) Pre-Depends: dpkg (>= 1.17.14) Recommends: ssl-cert Suggests: www-browser, apache2-doc, apache2-suexec-pristine | apache2-suexec-custom, ufw Conflicts: apache2.2-bin, apache2.2-common Conffiles: /etc/apache2/apache2.conf da32fcc6a783acaebf0d74c17c726bf7 /etc/default/apache-htcacheclean ae8721a0bc5b4e2ef7a5258b1e9db5c5 [..] /etc/logrotate.d/apache2 7322a4f050c1e2454249695236a3472c /etc/ufw/applications.d/apache2-utils.ufw.profile f8d4fd920e598ceb4379613c6261f6af Description: Apache HTTP Server The Apache HTTP Server Project's goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet. . Installing this package results in a full installation, including the configuration files, init scripts and support scripts. Homepage: http://httpd.apache.org/ Original-Maintainer: Debian Apache Maintainer
You can also find a package version by running the following command.
apache2:amd64/xenial-security 2.4.18-2ubuntu3.1 uptodate apache2:i386 not installed
Like you can see in the result above, we have installed apache2 64 bit version and its version is 2.4.18
If the ‘apt-show-versions’ program is not installed, you can install it with the command below.
sudo apt install apt-show-versions
You should now know how to check the installed package’s version.
- If you are wondering how you can see the version of a package in the repositories; for example, if there some sort of way to see the version of a package that is available in the official repositories. Yes it is possible, search for the tutorial: How to check the available version of a package in Ubuntu repositories
Find a package version in RPM based systems.
To see which version is installed, (Eg. Httpd) in RPM based distributions like Red Hat, CentOs, Fedora, Scientific Linux, and openSUSE, execute the command below.
rpm -qi httpd
Name : httpd Version : 2.4.6 Release : 40.el7.centos.4 Architecture: x86_64 Install Date: Thu 11 Aug 2016 08:08:45 PM IST Group : System Environment/Daemons Size : 9806117 License : ASL 2.0 Signature : RSA/SHA256, Mon 18 Jul 2016 09:35:16 PM IST, Key ID 24c6a8a7f4a80eb5 Source RPM : httpd-2.4.6-40.el7.centos.4.src.rpm Build Date : Mon 18 Jul 2016 09:02:11 PM IST Build Host : worker1.bsys.centos.org Relocations : (not relocatable) Packager : CentOS BuildSystem <http://bugs.centos.org> Vendor : CentOS URL : http://httpd.apache.org/ Summary : Apache HTTP Server Description :
The Apache HTTP Server is a powerful, efficient, and extensible web server.
The command above will display the installed package version, build date, license, description, and more. Like you can see in the output above, the http package version is 2.4.6.
This should be all for now, hope this tutorial helped with more to come.
One more thing…
Share this tutorial with your networking and hosting administrators, as it will help them and make my countless hours of work count.
Don’t forget to see best our related best guides and tutorials;