Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Is there a way to make reposync ignore /etc/yum.conf ?

When i use reposync --config=/my/path/to/alternative/inputrepo.conf it's still picking up repositories for consideration inside /etc/yum.repos.d

My alternative/inputrepo.conf just looks like:


...but reposync still picks up the google-chome repo, which is only in /etc/yum.repos.d/ and complains about varnish being defined twice.

This is a problem for me because some of the mirrors i want to sync are also present on the system in /etc/yum.repos.d/, but with different baseurls.

share|improve this question
up vote 3 down vote accepted

In your alternate yum.conf you need to set reposdir to something else so it won't look in /etc/yum.repos.d.

I put my repo definitions for reposync in /etc/reposync.repos.d so the line to add to the yum.conf you're using for reposync would look like this:

share|improve this answer


% reposync -p [destdir] --repoid=varnish

This option will sync repo varnish repo to your local repo to whatever directory you provide.

% reposync -p [destdir] -n --repoid=varnish

Will sync only the newest files for subsequent syncs.

share|improve this answer

Check out yum --disablerepo="*" ... and similar flags. Read the yum manpage.

share|improve this answer
I thought of this, but how does that help ? both repos have the same name. In my case 'varnish'. I can disable both, then will reposync use the ones from my file regardless ? -- i'll go try it. – Sirex Jan 30 '13 at 21:45
no joy. aside from all else, --disablerepo disables for the following yum operation, not a reposync one. – Sirex Jan 30 '13 at 21:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.