Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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:

wajig:
  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

3 Answers

up vote 2 down vote accepted

yum

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

yum list <package>

zypper

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

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

Your Answer

 
discard

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.