$ yum updateyum versionlock?Install package
For RHEL 5
# yum install yum-versionlock
For RHEL 6 and 7
# yum install yum-plugin-versionlock
For RHEL 8 and 9
# yum install python3-dnf-plugin-versionlock
The /etc/yum/pluginconf.d/versionlock.list will be created on the system.
To install or lock the version of the gcc group of packages, run
# yum versionlock gcc-*
Use the 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.
See the 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