With one repository I did it like this (as root):

# cd /etc/yum.repos
# wget https://some.repo.example.org/foo/bar/Fedora_14/foo_bar.repo
# grep enabled foo_bar.repo

Is this the recommended way to add a package repository under Fedora (>= 14)?

Is there some policy/standard which specifies that each proper Fedora package repository should (or must) contain such a config file (i.e. such a .repo file)?

(basically just for the reason that a user or some tool can copy it to the local /etc/yum.repos directory?)

  • 1
    @Tshepang: I don't understand. Have you mixed up question mark and full stop in your comment? And what typo are you referring to? Just point out the typo or edit my question and fix it since you have already spotted it. I fix the last question - but I don't know if this is the typo you mean ... Commented Feb 4, 2011 at 0:12
  • 2
    I made those prompts # because you said you ran the commands as root. That's the convention, and that's what root prompt looks like.
    – tshepang
    Commented Feb 4, 2011 at 8:43
  • @Tshepang, fair enough - changed the prompt to the common # convention. Commented Dec 17, 2011 at 18:27

6 Answers 6


The Fedora 14 docs. haven't been updated yet. The latest way to do this with just a .repo file is:

yum-config-manager --add-repo=https://some.repo.example.org/foo/bar/Fedora_14/foo_bar.repo

...you can then use yum-config-mananger --enable etc. too.


If you are using Fedora 22 or later, where dnf has replaced yum as the default package manager, then you can use this command taken from here:

dnf config-manager --add-repo repository_url

where repository_url is a link to the .repo file.

And you can enable it by:

dnf config-manager --set-enabled repository

where repository is the unique repository ID.


I googled a bit around with 'fedora add repository' and got some outdated and not very helpful links. Because of the noise I missed this link:


Which is kind of outdated as well, but it gives me the hint to look for an updated version of the software management guide:

Add New Repositories

(which also mentions the wget method I used to add a .repo file)

I am a bit surprised that the official and as it seems quite extensive fedora documentation is not higher scored in the google results.

  • The first link is to the Fedora Core 3 documentation, which is 5-6 years out of date. Commented Feb 16, 2011 at 14:54
  • @James Antill: Yeah - kind of outdated was used as an euphemism. ;) Anyways, when I googled the query, the 5-6 year old fedora link is what I got on the first result page (position > 20). Don't know if the fedora project pages do some stuff to annoy the google bot? Commented Feb 16, 2011 at 16:03

It appears that in recent versions of Fedora, there was an attempt to integrate a "Media Repo" with PackageKit, but there were enough bugs that it was left out of Fedora 14 (this for example). It sounds like you're going to have to follow the directions mentioned in the other answers to either copy the packages locally or mount the ISO image as a loopback device, and set up yum file:// URLs to point a the packages.


See here: Howto: Add a new yum repository to install software under CentOS / Redhat Linux

  • 3
    Note that the above url is for RHEL-5, which is 3 years old (so quite old compared to Fedora 14). Commented Feb 16, 2011 at 14:56

Adding a repository is quite easy in red hat or in any other redhat based system's. Its a matter of a repo file, which will specify the url from where to fetch the rpm files to install.

However if you want to understand the complete working of yum. I will recommend reading the below link.

YUM repository configuration

You must log in to answer this question.

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