7.2. Managing Software Repositories

When a system is subscribed to the Red Hat Content Delivery Network, a repository file is created in the /etc/yum.repos.d/ directory. To verify that, use yum to list all enabled repositories:
yum repolist
Red Hat Subscription Management also allows you to manually enable or disable software repositories provided by Red Hat. To list all available repositories, use the following command:
subscription-manager repos --list
The repository names depend on the specific version of Red Hat Enterprise Linux you are using and are in the following format:
rhel-version-variant-rpms
rhel-version-variant-debug-rpms
rhel-version-variant-source-rpms
Where version is the Red Hat Enterprise Linux system version (6 or 7), and variant is the Red Hat Enterprise Linux system variant (server or workstation), for example:
rhel-7-server-rpms
rhel-7-server-debug-rpms
rhel-7-server-source-rpms
To enable a repository, enter a command as follows:
subscription-manager repos --enable repository
Replace repository with the name of the repository to enable.
Similarly, to disable a repository, use the following command:
subscription-manager repos --disable repository
Section 9.5, “Configuring Yum and Yum Repositories” provides detailed information about managing software repositories using yum.
If you want to update the repositories automatically, you can use the yum-cron service. For more information, see Section 9.7, “Automatically Refreshing Package Database and Downloading Updates with Yum-cron”.