From Fedora Project Wiki

(dnf start)
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Docs Project]]
[[Category:Docs Project]]
[[Category:Draft documentation]]
[[Category:Draft documentation]]
[[Category:Documentation beats]]
[[Category:Documentation beats]]
== yum replaced by dnf ==
The `yum` package manager has been replaced in Fedora 22 by its successor, dnf.  The yum fork has been available in Fedora for testing since Fedora 18, and is now the default command line package manager.
Most dnf commands use directives that are familiar to yum users, and it uses the same RPM package repositories.  Behind the scenes, dnf uses an improved dependency solver, `hawkey`, along with `librepo` for repository operations and `libcomps` for package groups.
=== dnf behavior ===
The behavior of dnf differs from yum in some areas:
==== Updates that don't work are skipped ====
If a portion of a transaction is not viable, dnf will automatically exclude it and transparently continue with the portions that will work.  For example, if a package has unmet dependencies during a `dnf update` action, that package will not be updated, but others will.  This is similar to yum's "--skip-broken" directive, but evaluates the impact of the problem against the entire transaction.
To review details about a problematic package direction, you can use the "--best" option. `dnf update --best` will force dnf to resolve the transaction using the latest versions of involved packages, and report any problems instead of skipping them.
==== Clean on remove ====
When removing a package, dnf will automatically remove any dependent packages that were not explicitly installed by the user.  If a package was independently installed, it won't be uninstalled this way.
This behavior is configured by the "clean_requirements_on_remove" option in /etc/dnf/dnf.conf.
==== Repo cache refresh schedule ====
By default, dnf will check for updates in configured repositories hourly, starting ten minutes after the system boots.  The action is controlled by a systemd timer unit, /usr/lib/systemd/system/dnf-makecache.timer. 
To adjust this, copy the timer file to /etc/systemd/system/dnf-makecache.timer and edit it.
Alternatively, setting the '''metadata_timer_sync''' in /etc/dnf/dnf.conf to a number of seconds configures the minimum number of seconds between makecache operations.  If the timer has not expired, `dnf makecache` will exit immediately.
dnf will also honor the '''metadata_expire''' option set in individual repo configs, and refresh repo metadata at runtime if it is too old.  This option is described in `man yum.conf`.
==== Repository Actions =====
The "repository-packages" directive can be used to search for or get info about packages in a specific repository, list installed packages frrom that repository, and more.  This simplifies operations that would have required use of "--excluderepo" and "--includerepo" options with yum, and is especially useful for managing similar packages from different repositories.

Latest revision as of 01:32, 20 September 2016

DocsProject Header docTeam1.png

Beat Closed on Wiki
Work on beats has now moved to git at If you have changes or additions, please contact the docs team via #fedora-docs,, or with the release-notes BZ component.