Introduction
An RPM package update may cause issues or be unable to update due to conflicts, and an RPM version lock may be needed. The following information will provide information on how to lock a package to prevent updates of that RPM package.
Procedure
You need to install the version lock DNF or Yum plugin to manage version locks.
To install the version lock plugin, run the below command for your operating system:
CentOS 7:
yum install yum-versionlock
CentOS 7 went End of Life on June 30th 2024. If you run into an issue installing yum-versionlock due to the repository being archived, you can install the version lock RPM from the CentOS vault.
yum install https://vault.centos.org/7.9.2009/os/x86_64/Packages/yum-plugin-versionlock-1.1.31-54.el7_8.noarch.rpm
AlmaLinux, Rocky Linux, CloudLinux 8+:
dnf install python3-dnf-plugin-versionlock
You can version lock the package by running the following command:
yum versionlock <PACKAGENAME>
You can view what packages are currently under a version lock with the following command:
yum versionlock list
After the RPM package issue is resolved with either a newer update or the dependency issues are resolved, the version lock can be undone by executing the following:
yum versionlock delete <PACKAGENAME>
To clear all version locks for all locked packages, the following is executed:
yum versionlock clear
Please note that cPanel, LLC only supports the cPanel-provided software and does not provide general system administration services. Any issues related to system RPMs not provided by cPanel would be best addressed by an obtained qualified server/systems administrator.