Find Out the Package Version with DPKG and RPM

In this short article I will show you how to find out the version of a package with dpkg and rpm, on the most used Linux Distros.

For Debian, Ubuntu, Linux Mint, PuppyOS, Knoppix:

Syntax: dpkg -s {package_name}

$ dpkg -s vim | grep -i ^version
Version: 2:7.3.154+hg~74503f6ee649-2ubuntu3.1

$ dpkg -s firefox | grep -i ^version
Version: 7.0.1+build1+nobinonly-0ubuntu2

For Fedora, CentOS, openSUSE, Mandriva:

Syntax: rpm -q {package_name}

$ rpm -q firefox
firefox-7.0.1-1.fc16.x86_64

$ rpm -q gedit
gedit-3.2.1-1.fc16.x86_64

I have tested this commands in Linux Mint and Fedora.

You can find other related articles here.

Tagged with: , , , , , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!