How to limit updates a specific version of Red Hat Enterprise Linux?
Set a limit on the OS version that can be updated.
# subscription-manager release --show
Release not set
# subscription-manager release --set=7.2
Release set to: 7.2
# yum clean all
# subscription-manager release --show
Release: 7.2
Release the limitation on the OS version that can be updated.
# subscription-manager release --unset
Release preference has been unset
Delete any cached metadata after setting the release so that your system does not attempt to use any cached metadata.
RHEL 7 and below
# rm -rf /var/cache/yum
RHEL 8
# rm -rf /var/cache/dnf
Reff : https://access.redhat.com/solutions/2761031