- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Lock a package to a specific version only, and no later
- Exclude a package from
$ yum update
- What is
Install package named
yum-plugin-versionlock(RHEL 6 and 7),
yum-versionlock(RHEL 5) or
# 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.