How to exclude certain packages from Red Hat repositories when using subscription-manager ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6.4

Issue

  • Why subscription-manager keeps on removing exclude option added in /etc/yum.repos.d/redhat.repo file ?

Resolution

  • Install or update subscription-manager package to subscription-manager-1.1.10 or higher version and add exclude option for required repository in /etc/yum.repos.d/redhat.repo file. As example,
[rhel-6-server-rpms]
name = Red Hat Enterprise Linux 6 Server (RPMs)
baseurl = https://vm27.gsslab.pnq.redhat.com:8088/content/dist/rhel/server/6/$releasever/$basearch/os
enabled = 1
exclude = kernel

Root Cause

  • Version's before subscription-manager-1.1.10 does not persist exclude option added in redhat.repo file.

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.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.