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 the reposync command ignore a subdir of a public repo when mirroring it ?

It seems to only want to sync on the url that has the /repodata/ & /repoview/ dirs, but i'm wanting to avoid that because the repo i'm trying to mirror has 17MB of stuff i want in one subdir under the dir that has repodata in it, and 9GB of stuff I don't in another dir.

share|improve this question
up vote 1 down vote accepted

All appearances are that reposync won't do exactly what you are looking for.

Assuming that you are wanting the latest version of a few packages from a specific repo, rather than reposync, you could use repoquery to find and download the package(s):

grab the file for the machine and arch you are running on.

wget repoquery --location flash-plugin

grab a whole directory of packages:

repoquery --location -a --repoid adobe-linux-x86_64 | xargs wget

Not quite like reposync but may meet your needs. You don't get the whole repo, you only get the rpms themselves, but you could convert that into a local repo if that is what you need, or just serve up via http is that meets your needs.

share|improve this answer
ok, i figured reposync would do it just because it's so well known. Bummer ! I'll look into your repoquery suggestion though, looks promising. – Sirex Feb 11 '13 at 18:36

You would want to look at the "exclude" and "includepkgs" directives for your repository config file for reposync. You can manually specify a list of packages to either include or exclude to stop reposync from downloading them (or only downloading the specified subset).

While you can't exclude based on URL, you can just exclude all the packages by name in that directory.


share|improve this answer

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.