How to exclude certain packages from Red Hat repositories when using subscription-manager ?
Environment
- Red Hat Enterprise Linux 6.4
Issue
- Why
subscription-managerkeeps on removingexcludeoption added in/etc/yum.repos.d/redhat.repofile ?
Resolution
- Install or update
subscription-managerpackage tosubscription-manager-1.1.10or higher version and addexcludeoption for required repository in/etc/yum.repos.d/redhat.repofile. As example,
[rhel-6-server-rpms]
name = Red Hat Enterprise Linux 6 Server (RPMs)
baseurl = https://example.redhat.com:8088/content/dist/rhel/server/6/$releasever/$basearch/os
enabled = 1
exclude = kernel
Root Cause
- Version's before
subscription-manager-1.1.10does not persistexcludeoption added inredhat.repofile.
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
