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 7:
yum install yum-plugin-versionlock
AlmaLinux, Rocky Linux, CloudLinux 8+:
dnf install python3-dnf-plugin-versionlock
Once the version locking plugin for your operating system is installed, we can now version packages to keep them on the installed version.
You can version lock the package by running the following command:
yum versionlock <PACKAGENAME>
Once the package is version locked, we would then recommend running the following command. This will set it so that the package is automatically unlocked after 30 days.
This will allow time for an update to be released and the package unlocked to allow for updates to be applied. At jobs need to be added again after reboots.
echo "yum versionlock delete <PACKAGENAME>" | at now + 30 days
You can view what packages are currently under a version lock with the following command:
yum versionlock list
For instructions on removing a version lock manually, please see our article on this here:
How to remove version lock packages
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.
Comments
0 comments
Article is closed for comments.