How to check available package versions in rpm systems?

  • 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 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?

  • wag

    wag Correct answer

    10 years ago

    yum For RHEL/Fedora/Centos/Scientific Linux

    Provides the command list to display information about installed and upgradeable (and older) packages.

    yum --showduplicates 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.

    You should also add `--showduplicates` to `yum` if you want to see ALL available versions, not just the latest.

    the --exact-match option does not seem to be available for yum nor for zypper...

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM