Ask Your Question

How to reinstall dnf?

asked 2017-12-27 00:08:58 -0600

Dixit gravatar image

please suggest how i can reinstall dnf completed. the /etc/dnf directory has been removed accidentally.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2017-12-27 10:02:39 -0600

villykruse gravatar image

If /etc/dnf is the only thing missing, dnf is still functional. Following would then re-install most of the dnf packages.

sudo dnf reinstall '*dnf*'

The package dnf-conf is the package providing the /etc/dnf and its contents.

edit flag offensive delete link more

answered 2017-12-27 00:43:46 -0600

davidva gravatar image
yum-deprecated -y reinstall dnf dnf-conf


edit flag offensive delete link more


Thanks for your response.

System itself says you should use dnf instead yum. i am on fedora 24. i guess dnf becomes the default package manager since fedora 22.

command output.

root@localhost ~]# sudo yum-deprecated -y reinstall dnf dnf-conf Yum command has been deprecated, use dnf instead. See 'man dnf' and 'man yum2dnf' for more information.

Dixit gravatar imageDixit ( 2017-12-27 01:09:34 -0600 )edit

Don't matter, it should work,,,

davidva gravatar imagedavidva ( 2017-12-27 02:19:44 -0600 )edit

it should sill work as long a the package yum is already installed. Gnome Software may also work.

villykruse gravatar imagevillykruse ( 2017-12-27 10:04:10 -0600 )edit

answered 2017-12-27 01:03:06 -0600

abadrinath gravatar image

RPM reinstall could do it too.

edit flag offensive delete link more


Hello, Thanks for response. i don't have it dnf package to be reinstall (dnf.rpm). sharing the command output as below - [root@localhost ~]# rpm -qa | grep dnf python3-dnf-1.1.10-1.fc23.noarch python3-dnf-plugins-core-0.1.21-3.fc23.noarch dnf-yum-1.1.10-1.fc23.noarch dnf-conf-1.1.10-1.fc23.noarch dnf-plugins-core-0.1.21-3.fc23.noarch dnf-1.1.10-1.fc23.noarch

Dixit gravatar imageDixit ( 2017-12-27 01:06:57 -0600 )edit

It should be this one: dnf-yum-1.1.10-1.fc23.noarch

abadrinath gravatar imageabadrinath ( 2017-12-27 02:00:23 -0600 )edit

Question Tools


Asked: 2017-12-27 00:08:58 -0600

Seen: 1,296 times

Last updated: Dec 27 '17