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

Solution Verified - Updated -


  • Red Hat Enterprise Linux 6.4


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


  • 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,
name = Red Hat Enterprise Linux 6 Server (RPMs)
baseurl =$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.