Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

15.6.3. Setting a Preferred Operating System Release Version in the Command Line

Many IT environments have to be certified to meet a certain level of security or other criteria. In that case, major upgrades must be carefully planned and controlled — so administrators cannot simply run yum update and move from version to version.
Setting a release version preference limits the system access to content repositories associated with that operating system version instead of automatically using the newest or latest version repositories.
For example, if the preferred operating system version is 5.9, then 5.9 content repositories will be preferred for all installed products and attached subscriptions for the system, even as other repositories become available.

Example 15.7. Setting an Operating System Release During Registration

A preference for a release version can be set when the system is registered by using --release option with the register. This applies the release preference to any subscriptions selected and auto-attached to the system at registration time.
Setting a preference requires the --autosubscribe option, because it is one of the criteria used to select subscriptions to auto-attach.
[root#server ~]# subscription-manager register --autosubscribe --release=5.9


Unlike setting a service level preference, a release preference can only be used during registration or set as a preference. It cannot be specified with the subscribe command.

Example 15.8. Setting an Operating System Release Preference

The release command can display the available operating system releases, based on the available, purchased (not only attached) subscriptions for the organization.
[root#server ~]# subscription-manager release --list
          Available Releases
The --set then sets the preference to one of the available release versions:
[root#server ~]# subscription-manager release --set=5.9
Release version set to: 5.9