Ask Your Question

Sample dnf.conf and repos

asked 2017-10-12 06:59:46 +0000

Bavarian gravatar image


Where I can find an example of /etc/dnf/dnf.conf and repos file?

I've accidentally deleted mine and now can't install/update any packages.


edit retag flag offensive close merge delete


You should specify which Fedora release you are looking at.

florian ( 2017-10-13 03:21:38 +0000 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2017-10-12 08:50:45 +0000

Glenn gravatar image

updated 2017-10-12 08:51:58 +0000

To reinstall the repository files in /etc/yum.repos.d, using root permissions or logged in as root, for Fedora 26 you should be able to do the following:

wget https://download-ib01.fedoraproject.org/pub/fedora/linux//releases/26/Everything/x86_64/os/Packages/f/fedora-release-26-1.noarch.rpm

rpm --force -Uvh fedora-release-26-1.noarch.rpm
edit flag offensive delete link more

answered 2017-10-12 07:34:23 +0000

villykruse gravatar image

updated 2017-10-12 07:40:58 +0000

You can find the rpm from here and select the one matching your fedora version. This one is for f26

Once downloaded you can install it using (as root)

rpm -v --reinstall fedora-repos-26-1.noarch.rpm

Or to unpack the rpm without installing

rpm2cpio fedora-repos-26-1.noarch.rpm | cpio -idmvu

You can also clone the git repository

git clone https://pagure.io/fedora-repos.git
edit flag offensive delete link more

answered 2017-10-13 03:25:47 +0000

florian gravatar image

updated 2017-10-13 03:27:04 +0000

Here is an example of my almost-default dnf.conf file.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2017-10-12 06:59:46 +0000

Seen: 91 times

Last updated: Oct 13 '17