- Red Hat Enterprise Linux (RHEL) 5, 6, 7
- Updating a specific package version will cause issues, or must be done separately
- Lock a package to a specific version only, and no later
- Exclude a package from
$ yum update
- What is
Install package named
yum-versionlockin RHEL 5).
# yum install yum-plugin-versionlock
/etc/yum/pluginconf.d/versionlock.listwill be created on the system.
To install or lock the version of the
gccgroup of packages, run
# yum versionlock gcc-*
yum versionlock plugin to lock a package or packages to currently installed version. The plugin stores a package list in `/etc/yum/pluginconf.d/versionlock.list, which you can edit directly. Yum will normally attempt to update all packages, but the plugin will exclude the packages listed in the versionlock.list file.
The above configuration will not allow
yum update or
yum upgrade to update any of the
gcc packages to version greater than what was installed at the time the locking was performed.
yum-versionlock(1) for a list of all available commands.
To display the list of locked packages, use:
# yum versionlock list
To discard the list of locked packages, use
# yum versionlock clear
- Red Hat Enterprise Linux
- Learn more
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.