2018-03-27 03:41:50 +00:00
[[chap-dnf]]
2018-05-25 19:54:28 +00:00
= Using the DNF software package manager
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
DNF is a software package manager that installs, updates, and removes packages on Fedora and is the successor to YUM (Yellow-Dog Updater Modified).
DNF makes it easy to maintain packages by automatically checking for dependencies and determines the actions required to install packages.
This method eliminates the need to manually install or update the package, and its dependencies, using the `rpm` command.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
[[sect-dnf-installation]]
== Installation
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
DNF has replaced YUM as the default package manager for Fedora since version 22.
However, for earlier versions of Fedora, starting from version 18, DNF can be installed from the command-line with:
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
----
2018-08-11 10:11:44 +00:00
# yum install dnf
2018-03-27 03:41:50 +00:00
----
2018-01-26 18:29:28 +00:00
2018-03-27 03:41:50 +00:00
[[sect-usage]]
== Usage
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
`dnf` can be used exactly as `yum` to search, install or remove packages.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
To search the repositories for a package type:
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
----
2018-08-11 10:11:44 +00:00
# sudo dnf search packagename
2018-03-27 03:41:50 +00:00
----
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
To install the package:
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
----
2018-08-11 10:11:44 +00:00
# dnf install packagename
2018-03-27 03:41:50 +00:00
----
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
To remove a package:
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
----
2018-08-11 10:11:44 +00:00
# dnf remove packagename
2018-03-27 03:41:50 +00:00
----
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
Other common DNF commands include:
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
* `autoremove` - removes packages installed as dependencies that are no longer required by currently installed programs.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
* `check-update` - checks for updates, but does not download or install the packages.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
* `downgrade` - reverts to the previous version of a package.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
* `info` - provides basic information about the package including name, version, release, and description.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
* `reinstall` - reinstalls the currently installed package.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
* `update/upgrade` - checks the repositories for newer packages and updates them.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
For more DNF commands refer to the man pages by typing `man dnf` at the command-line, or link:++http://dnf.readthedocs.io/en/latest/command_ref.html[DNF Read The Docs]
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
[[sect-automatic-updates]]
== Automatic Updates
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
The `dnf-automatic` package is a component that allows automatic download and installation of updates.
It can automatically monitor and report, via e-mail, the availability of updates or send a log about downloaded packages and installed updates.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
For more information, refer to the link:++http://dnf.readthedocs.org/en/latest/automatic.html[Read the Docs: DNF-Automatic] page.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
[[sect-system-upgrades]]
== System Upgrades
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
The Fedora system can be upgraded directly with DNF, or with the DNF system upgrade plugin.
Refer to the link:++upgrading.html++[Upgrade] document for more details.
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
[[sect-language-support-using-dnf]]
== Language Support Using DNF
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
DNF can be used to install or remove Language Support.
A detailed description with a list of available languages can be found on link:++https://fedoraproject.org/wiki/I18N/Language_Support_Using_Dnf[Language Support Using Dnf] page.
2017-10-26 21:20:01 +00:00
2018-08-11 08:42:30 +00:00
[[sect-plugins]]
== Plugins
The core DNF functionality can be extended with plugins.
There are officially supported https://dnf-plugins-core.readthedocs.io[Core DNF plugins]
2018-08-11 10:11:44 +00:00
and also third-party https://dnf-plugins-extras.readthedocs.io[Extras DNF Plugins].
2018-08-11 08:42:30 +00:00
To install them, run
----
2018-08-11 10:11:44 +00:00
# dnf install dnf-plugins-core-PLUGIN_NAME
2018-08-11 08:42:30 +00:00
----
or
----
2018-08-11 10:11:44 +00:00
# dnf install dnf-plugins-extras-PLUGIN_NAME
2018-08-11 08:42:30 +00:00
----
2018-03-27 03:41:50 +00:00
[[sect-references]]
== References
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
. http://dnf.readthedocs.org/en/latest/command_ref.html[DNF Command Reference]
2017-10-26 21:20:01 +00:00
2018-03-27 03:41:50 +00:00
. http://dnf.baseurl.org/[DNF blog]
2017-10-26 21:20:01 +00:00
2018-08-11 10:11:44 +00:00
. https://github.com/rpm-software-management/dnf/wiki[DNF wiki]