Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In centos how can I get a list of installed repositories?

share|improve this question
up vote 52 down vote accepted
yum repolist
yum repolist enabled

shows all enabled repositories. These two commands are identical.

yum repolist disabled

shows disabled repositories.

yum repolist all

shows everything.

share|improve this answer
superb answer... How to enable disabled repos? – max Oct 17 '12 at 13:22
Edit the corresponding file in /etc/yum.repos.d and change enabled=1 to enabled=0. – Michael Hampton Oct 17 '12 at 13:44
Thanks got it... – max Oct 17 '12 at 14:00
to enable a repo: yum-config-manager --enable <repo>, to disable: yum-config-manager --disable <repo>. – slm Jul 10 '15 at 5:55

This is the path of yum repository

[root@localhost yum.repos.d]# pwd


This is the content of that directory

[root@localhost yum.repos.d]# ll
total 60
-rw-r--r-- 1 root root  179 Jul 17 11:56 adobe-linux-i386.repo
-rw-r--r-- 1 root root 1926 Jun 26 14:59 CentOS-Base.repo
-rw-r--r-- 1 root root  637 Jun 26 14:59 CentOS-Debuginfo.repo
-rw-r--r-- 1 root root  626 Jun 26 14:59 CentOS-Media.repo
-rw-r--r-- 1 root root 2593 Jun 26 14:59 CentOS-Vault.repo
-rw-r--r-- 1 root root  912 Jan 23  2011 elrepo.repo
-rw-r--r-- 1 root root  957 May  9 21:25 epel.repo
-rw-r--r-- 1 root root 1056 May  9 21:25 epel-testing.repo

The difference between yum.conf and yum.repos.d is in earliar system yum.conf (/etc/yum.conf) was using, within a single file we have to configure everything it was very congesting so now what they did is, they created several repo files, instead of one repo file and all the repos are kept under /etc/yum.repos.d/ directory.

share|improve this answer

This Page indicates that yum keeps individual repository settings in the [repository] sections in /etc/yum.conf and .repo files in the /etc/yum.repos.d/ directory. You should be able to see all the repositories from these two places. The link is about Redhat so YMMV.

From this link (also red hat), yum-config-manager repository might (or might not) achieve the same as above.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .