DISABLE YUM REPOSITORY IN LINUX

I want to disable yum repository which caused frequent error during package download.

Loaded plugins: security, ulninfo
https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'releases.ansible.com'"
Trying other mirror.
https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'releases.ansible.com'"
Trying other mirror.

To disable a repository from yum

[root@tibero tibero]# yum-config-manager --disable Ansible
=================================================== repo: Ansible ====================================================
[Ansible]
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/6Server
baseurl = https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/
cache = 0
cachedir = /var/cache/yum/x86_64/6Server/Ansible
cost = 1000
enabled = 0
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/6Server/Ansible/gpgcadir
gpgcakey =
gpgcheck = False
gpgdir = /var/lib/yum/repos/x86_64/6Server/Ansible/gpgdir
gpgkey =
hdrdir = /var/cache/yum/x86_64/6Server/Ansible/headers
http_caching = all
includepkgs =
keepalive = True
mdpolicy = group:primary
mediaid =
metadata_expire = 21600
metalink =
mirrorlist =
mirrorlist_expire = 86400
name = ansible
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/6Server/Ansible
pkgdir = /var/cache/yum/x86_64/6Server/Ansible/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
username =

Verify disabled repository

[root@tibero tibero]# yum repolist all|grep 'Ansible'
http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
Ansible                       ansible                                 disabled

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s