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.

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

Red Hat docs say:

To see which installed packages on your system have updates available, use the following command:

yum check-update

What command must I run to view all available versions for a package installed on my system?

Example: yum check-update tells me java6 update #43 is available, but what if I want update #40?

share|improve this question
up vote 6 down vote accepted

It won't focus specifically on one package because it's using a regex to do the matching but I often use this:

$ yum list available java\*
java-1.4.2-gcj-compat.i386                                                                                               installed
java-1.6.0-openjdk.i386                                                      1:                                            installed
Available Packages
java-1.4.2-gcj-compat-devel.i386                                                                                         base     
java-1.4.2-gcj-compat-javadoc.i386                                                                                       base     
java-1.4.2-gcj-compat-src.i386                                                                                           base     
java-1.6.0-openjdk.i386                                                      1:                                           updates  
java-1.6.0-openjdk-demo.i386                                                 1:

You can make it "smarter" by filtering the output using grep.

share|improve this answer
Then I can run yum update <package-name> provided the package, to which I'm trying to upgrade, is, in fact, a higher version of my currently installed package? – Kevin Meredith May 15 '13 at 19:05
That would be correct. You can update to the next version from what you currently have installed. – slm May 15 '13 at 19:08
Note that the official repositories very rarely carry more than one version of a package, old packages are obsoleted for a reason. – vonbrand May 15 '13 at 20:03
You want to use --show-duplicates to see all the versions, but as vonbrand said if you are using CentOS/Fedora you only get the latest anyway (If you pay for actual RHEL, you'll get a lot of choice and may want to look at the upgrade-to command as well). – James Antill May 17 '13 at 18:30

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.