Question relevant to RedHat/CentOS. I'm a little confused between package and library and how to pin them to a fixed version.

There's an X11 rollover bug in recent libxcb versions that affects my C programs. libxcb-1.5-1 doesn't have that bug.

So I did:

# yum remove libxcb-devel
# rpm -Uvh --oldpackage libxcb-1.5-1.el6.i686.rpm 

And now the bug is gone and my software works fine.

Fast forward a few weeks and the bug is back.

# yum info libxcb-devel
Loaded plugins: refresh-packagekit, security
Available Packages
Name       : libxcb-devel
Arch       : i686
Version    : 1.9.1
Release    : 2.el6
Size       : 1.0 M
Repo       : sl-security

But is that the installed version or the version available through the repo ? How can I tell which version of libxcb is currently installed ?

$ ll /usr/lib/libxcb.so*
lrwxrwxrwx 1 root root     15 Aug  6 03:38 /usr/lib/libxcb.so.1 -> libxcb.so.1.1.0*
-rwxr-xr-x 1 root root 130752 Oct 14  2014 /usr/lib/libxcb.so.1.1.0*
$ readelf -d /usr/lib/libxcb.so.1.1.0 | grep SONAME
 0x0000000e (SONAME)                     Library soname: [libxcb.so.1]

So I'm confused between the version number shown by yum, the number on the .so and the number I want...

2 Answers 2


If you want to know what version is installed, just run:

rpm -q libxcb-devel

If you want to prevent upgrades to this package, you can add the package to the yum exclude configuration. Add the following to the main section in /etc/yum.conf:


The library version (e.g., in libxcb.so.1.1.0) very seldom tracks the package version, and is meant to track API changes.

# yum remove libxcb-devel
# rpm -Uvh --oldpackage libxcb-1.5-1.el6.i686.rpm 

These are two different packages. The -devel version is for compiling against, the libxcb package without -devel is what applications will be running against.

Because you removed the -devel version that there isn't anything installed, so "yum info" only shows you the latest available version (you can use the --showduplicates option to see all the versions). If you want to stop it upgrading, I'd recommend installing/using the versionlock plugin on the libxcb package ... although it an be done manually using excludes.

Also use rpm directly, you can just use: yum downgrade blah.rpm

  • yum downgrade didn't seem available. Is that a recent addition ? Thanks for the versionlock tip, I'd never heard of it.
    – dargaud
    Aug 26, 2015 at 22:21
  • Removed the devel to avoid risks of static linking, I guess.
    – dargaud
    Aug 27, 2015 at 18:26
  • 1
    yum downgrade is available since at least RHEL6
    – doktor5000
    Aug 27, 2015 at 20:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .