Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I want to check available versions of a package in Debian, I run apt-cache policy pkgname which in the case of wajig gives:

  Installed: 2.01
  Candidate: 2.01
  Version table:
 *** 2.01 0
        100 /var/lib/dpkg/status
     2.0.47 0
        500 file:/home/wena/.repo_bin/ squeeze/main i386 Packages
        500 ftp://ftp.is.co.za/debian/ squeeze/main i386 Packages

That means that there are three wajig packages, one that is installed (/var/lib/dpkg/status), and two others (which are the same version). One of these two is in a local repository and the other is available from a remote repository.

How do I achieve a similar result on rpm systems?

share|improve this question
up vote 6 down vote accepted

yum For RHEL/Fedora/Centos/Scientific Linux

Provides the command list to display information about installed and upgradeable package.

yum list <package>

zypper For SuSE Linux

Can return a detailed list of available and installed packages or patches.

zypper search -s <package>

Adding --exact-match can help, if there are multiple packages.

As a side-note, here is a comparison of package-management commands.

share|improve this answer

To query the available packages, you can do urpmq --sources YOURPACKAGE This is Mandriva-specific (I only know Mandriva).

If you want to know the version of an installed package : rpm -q YOURPACKAGE This works on all RPM systems.

On RedHat/Fedora, see yum.

share|improve this answer

The other answers addresses how to get information about the installed packages on the system. To add to that, it is also possible to query the yum repository about available not yet installed packages in addition with the pkcon search command from PackageKit, e.g.

$ pkcon search name xz
Searching by name             [=========================]         
Starting                      [=========================]         
Querying                      [=========================]         
Available       pxz-4.999.9-2.beta.20100608git.fc15.i686        Parallel LZMA compressor using XZ
Installed       xz-5.0.3-1.fc15.i686                            LZMA compression utilities
Available       xz-compat-libs-5.0.1-2.fc15.i686                Compatibility libraries for decoding LZMA compression
Available       xz-compat-libs-5.0.3-1.fc15.i686                Compatibility libraries for decoding LZMA compression
Installed       xz-debuginfo-5.0.3-1.fc15.i686                  Debug information for package xz
Installed       xz-devel-5.0.3-1.fc15.i686                      Devel libraries & headers for liblzma
Installed       xz-libs-5.0.3-1.fc15.i686                       Libraries for decoding LZMA compression
Installed       xz-lzma-compat-5.0.3-1.fc15.i686                Older LZMA format compatibility binaries
Installed       xzgv-0.9.1-3.fc15.i686                          Picture viewer

I assume PackageKit is written generic so that it works with apt repositories as well, although I have only experience from using it on my Fedora systems.

share|improve this answer

Running the below commands shall give you all the installed packages on the server.

rpm -qa | grep <packagename>

More rpm commands are listed here

share|improve this answer

You can use rpm -qi <package name> to have all information of installed package. You can use below commands as well:

yum info <package name>
yum list <package name>
yum --showduplicates list <package name>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.