Ask Your Question
1

Sample dnf.conf and repos

asked 2017-10-12 01:59:46 -0600

Bavarian gravatar image

Hello,

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.

Thanks

edit retag flag offensive close merge delete

Comments

You should specify which Fedora release you are looking at.

florian gravatar imageflorian ( 2017-10-12 22:21:38 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2017-10-12 22:25:47 -0600

florian gravatar image

updated 2017-10-12 22:27:04 -0600

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

[main]
gpgcheck=1
installonly_limit=6
clean_requirements_on_remove=True
defaultyes=1
edit flag offensive delete link more
1

answered 2017-10-12 03:50:45 -0600

Glenn gravatar image

updated 2017-10-12 03:51:58 -0600

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
1

answered 2017-10-12 02:34:23 -0600

villykruse gravatar image

updated 2017-10-12 02:40:58 -0600

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

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-10-12 01:59:46 -0600

Seen: 480 times

Last updated: Oct 12 '17