73

How can I tell the version of a package after doing a yum search?

e.g.

yum search rabbitmq

returns

rabbitmq-server.noarch : The RabbitMQ server

I need to know the version of this server.

DD.
  • 3,024
  • 10
  • 34
  • 50

4 Answers4

90

You can find the version number of a package in your repositories with the yum info command.

# yum info rabbitmq-server
Available Packages
Name        : rabbitmq-server
Arch        : noarch
Version     : 2.6.1
Release     : 1.fc16
Size        : 1.1 M
Repo        : updates
Committer   : Peter Lemenkov <lemenkov@gmail.com>
Committime  : Tue Nov  8 13:00:00 2011
Buildtime   : Tue Nov  8 10:31:03 2011
Summary     : The RabbitMQ server
URL         : http://www.rabbitmq.com/
License     : MPLv1.1
Description : RabbitMQ is an implementation of AMQP, the emerging standard for high
            : performance enterprise messaging. The RabbitMQ server is a robust and
            : scalable implementation of an AMQP broker.

To find the version numbers of installed packages, you can use rpm with the -q option.

# rpm -q kernel
kernel-3.3.1-5.fc16.x86_64
kernel-3.3.2-1.fc16.x86_64
kernel-3.3.2-6.fc16.x86_64
Kenny Rasschaert
  • 8,925
  • 3
  • 41
  • 58
  • my version is much older...which repo are you using? – DD. May 02 '12 at 14:16
  • I ran this command on my Fedora 16 laptop, but the command applies to any system with yum and rpm, such as RHEL or CentOS. – Kenny Rasschaert May 02 '12 at 17:18
  • I'm running Centos 6 but my repo looks old...is there a way to update it? – DD. May 03 '12 at 10:16
  • The EPEL repositories (http://fedoraproject.org/wiki/EPEL) also offer RabbitMQ-server 2.6.1 in their repository for CentOS/RHEL 6. Here's a guide to get you going: http://johnpoelstra.com/2010/12/23/rhel-6-epel/ – Kenny Rasschaert May 03 '12 at 10:51
10

AFAIK, yum info only shows information for one specific "instance" of a package. I wanted to know not what version I had installed but which were available on the repos. So this did it for me:

yum -v list package_name --show-duplicates
bishop
  • 1,077
  • 10
  • 16
vesperto
  • 220
  • 2
  • 6
  • `yum info` shows all packages, installed and available in enabled repos, by the name specified. Or if you run it without a package name it'll just show you all the info that it has. – Jeter-work May 11 '17 at 15:35
  • 3
    --show-duplicates (with dash) – Nir O. Apr 09 '18 at 13:51
  • @Xalorous What version? I only get the current package with `yum info` (on a system apparently old enough that `--show-duplicates` isn't an option to `yum list`) – Izkata Jul 16 '18 at 14:48
  • RHEL 6.9, yum 3.2.29. And I'm seeing the same behavior you are. It only lists the installed versions. Possibly latest version if it is newer than installed. E.g. I see 3 kernels, 2.6.32, all installed. But I know our (custom) repo has a bunch more. – Jeter-work Jul 16 '18 at 18:50
  • Note: --showduplicates (without dash) here on CentOS 8 (dnf/v4.2.23) – ArendE May 03 '21 at 13:05
3

You can get more info with the following command:

yum info rabbitmq
Bart De Vos
  • 17,761
  • 6
  • 62
  • 81
3

OR

yum list rabbitmq

if you prefer condensed output.

ank
  • 700
  • 5
  • 13