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 pkgnamewhich in the case of
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?
yum For RHEL/Fedora/Centos/Scientific Linux
Provides the command
listto 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>
--exact-matchcan 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.