IBM Support

How to lock a specific package version using yum

Troubleshooting


Problem

Summary

This article discusses how to lock a specific package version using yum.

Applies to

  • DSE and agent package installations on RHEL-based systems using Yum

Symptoms

When installing a specific version of DSE or Agent packages, yum automatically installs or upgrades to a later version than specified.

For example you might run the following command:

sudo yum install datastax-agent-5.2.5 --exclude dse-full

but the Agent package version 6.7 will be installed rather than version 5.2.5

Solution

As per RedHat Technote 98873 users can restrict yum to install or upgrade a package to a fixed specific version using the versionlock plugin of yum.

To do this:

  1. Install the package named yum-plugin-versionlock (called yum-versionlock in RHEL 5).

    # yum install yum-plugin-versionlock
    

    The /etc/yum/pluginconf.d/versionlock.list will be created on the system.

  2. To install or lock the version of the DSE/Agent package, add that package name to the /etc/yum/pluginconf.d/versionlock.list file. As per previous example:

    # yum versionlock datastax-agent-5.2.5
    

    (Alternatively, you can edit the filelist, /etc/yum/pluginconf.d/versionlock.list, directly.)

  • The above configuration will not allow to upgrade the Agent package to a version later than what the version that was installed at the time the locking was performed.
  • Yum will attempt to update all packages, while excluding the packages listed in the versionlock file.

See also

Other Commands

To display the list, use:

# yum versionlock list

To discard the list, use:

# yum versionlock clear

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCR56","label":"IBM DataStax Enterprise"},"ARM Category":[{"code":"","label":""}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Historical Number

ka06R000000HcGMQA0

Document Information

Modified date:
30 January 2026

UID

ibm17258922