Rather new to yum so excuse if I don't word something correctly. We're trying to use only in-house RPMs, so is it possible to enable users to be able to install only from our repo(s), without disabling other repositories that may contain dependencies for packages from ours?

For example, say we have our RPMs in repository A, but some of them depend on packages in repository B. However, the person installing package from A should not be able to install directly from B. Basically putting a degree of separation between the user and repository B.

 O   can install from A |-----|  which has dependencies in  |-----|
-|-   <------------>    |repoA|  <----------------------->  |repoB|
/ \                     |-----|                             |-----|
 |                                                             ^
 | should not be able          \ /                             |
   to access B                 / \

I should note that this could be done via plugin (which I would need to write), but I'm curious how to do it in general first.

1 Answer 1


There is an includepkgs directive you can include in a .repo file that may be what you're looking for.

If you edit your "B" repo file in /etc/yum.repos.d and add

includepkgs= dependency1 dependency2 etc

Then it should only pull down the packages you define.

I can't test just now but if that doesn't work it may work if you put

`exclude = *`

before the includepkgs directive as a sort of default deny rule.

  • will this prevent users from installing from B directly? Sep 9, 2016 at 14:10
  • As I said, can't test at the minute. However, it should do as this is your global repo config and users shouldn't be able to change that. Sep 9, 2016 at 14:13

You must log in to answer this question.

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