CentOS 7 yum - remove subscription-manager message

2021-04-14

Here is the nag message

root@vm$ yum makecache
Loaded plugins: fastestmirror, langpacks, post-transaction-actions, product-id, search-disabled-repos,
              : subscription-manager, versionlock

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile

Basically it is telling you your system is not enrolled to Red Hat Subscription Management.
To remove the nag, you just have to disable the subscription-management (yum) plugin.
The config file is /etc/yum/pluginconf.d/subscription-manager.conf.

root@vm$ sed -i 's/enabled=.*$/enabled=0/' /etc/yum/pluginconf.d/subscription-manager.conf

Tags: centos yum