From Fedora Project Wiki

No edit summary
No edit summary
Line 3: Line 3:
DNF is a software package manager that installs, updates, and removes [[package]]s on [[RPM]]-based Linux distributions. It automatically computes dependencies and figures out what things should occur to install packages. DNF makes it easier to maintain groups of machines without having to manually update each one using [[rpm]].  
DNF is a software package manager that installs, updates, and removes [[package]]s on [[RPM]]-based Linux distributions. It automatically computes dependencies and figures out what things should occur to install packages. DNF makes it easier to maintain groups of machines without having to manually update each one using [[rpm]].  


DNF is the next upcoming major version of Yum. It roughly maintains <abbr Title="Command-Line Interface">CLI</abbr> compatibility with [[Yum]] and defines strict <abbr Title="Application Program Interface">API</abbr> for extensions and plugins. Plugins can modify or extend features of DNF or provide additional <abbr Title="Command-Line Interface">CLI</abbr> commands on top of those mentioned below. If you know the name of such a command (including commands mentioned bellow), you may find/install the package which provides it using the appropriate virtual provide in the form of dnf-command(<alias>) where <alias> is the name of the command; e.g. dnf-command(repoquery) for a repoquery command (the same applies to specifying dependencies of packages that require a particular command).
DNF is the next upcoming major version of [[YUM]]. It roughly maintains <abbr Title="Command-Line Interface">CLI</abbr> compatibility with [[Yum]] and defines strict <abbr Title="Application Program Interface">API</abbr> for extensions and plugins. Plugins can modify or extend features of DNF or provide additional <abbr Title="Command-Line Interface">CLI</abbr> commands on top of those mentioned below. If you know the name of such a command (including commands mentioned bellow), you may find/install the package which provides it using the appropriate virtual provide in the form of dnf-command(<alias>) where <alias> is the name of the command; e.g. dnf-command(repoquery) for a repoquery command (the same applies to specifying dependencies of packages that require a particular command).


{{Infobox package
{{Infobox package
| name = DNF
| name = DNF
| package_name = dnf
| package_name = dnf
| package_added = Fedora 18, 19 20, 21
| package_added = Fedora 18, and later versions


| website =http://dnf.baseurl.org/
| website =http://dnf.baseurl.org/
Line 14: Line 14:
== Available commands ==
== Available commands ==


    autoremove
<abbr Title="dnf [options] autoremove&#13;&#13;Removes all “leaf” packages from the system that were originally installed as dependencies of user-installed packages but which are no longer required by any such package.">autoremove</abbr>
    check-update
 
    clean
<abbr Title="dnf [options] check-update [&lt;package-specs&gt;...]&#13;&#13;Non-interactively checks if updates of the specified packages are available. If no &lt;package-specs&gt; are given checks whether any updates at all are available for your system. DNF exit code will be 100 when there are updates available and a list of the updates will be printed, 0 if not and 1 if an error occurs.&#13;&#13;Please note that having a specific newer version available for an installed package (and reported by check-update) does not imply that subsequent dnf upgrade will install it. The difference is that dnf upgrade must also ensure the satisfiability of all dependencies and other restrictions.">check-update</abbr>
    distro-sync
 
    downgrade
<abbr Title="Performs cleanup of temporary files for the currently enabled repositories.&#13;&#13;dnf clean dbcache&#13;    Removes cache files generated from the repository metadata. This forces DNF to regenerate the cache files the next time it is run.&#13;&#13;dnf clean expire-cache&#13;    Removes local cookie files saying when the metadata and mirrorlists were downloaded for each repo. DNF will re-validate the cache for each repo the next time it is used.&#13;&#13;dnf clean metadata&#13;    Removes repository metadata. Those are the files which DNF uses to determine the remote availability of packages. Using this option will make DNF download all the metadata the next time it is run.&#13;&#13;dnf clean packages&#13;    Removes any cached packages from the system.&#13;&#13;dnf clean plugins&#13;    Tells all enabled plugins to eliminate their cached data.&#13;&#13;dnf clean all&#13;    Does all of the above.">clean</abbr>
    group
 
<abbr Title="dnf distro-sync [&lt;package-spec&gt;...]&#13;&#13;As necessary upgrades, downgrades or keeps selected installed packages to match the latest version available from any enabled repository. If no package is given, all installed packages are considered.">distro-sync</abbr>
 
<abbr Title="dnf [options] downgrade &lt;package-installed-specs&gt;...&#13;&#13;Downgrades the specified packages to the highest of all known lower versions if possible. When version is given and is lower than version of installed package then it downgrades to target version.">downgrade</abbr>
 
<abbr Title="Groups are virtual collections of packages. DNF keeps track of groups that the user selected (“marked”) installed and can manipulate the comprising packages with simple commands.&#13;&#13;dnf [options] group [summary] &lt;group-spec&gt;&#13;    Display overview of how many groups are installed and available. With a spec, limit the output to the matching groups. summary is the default groups subcommand.&#13;&#13;dnf [options] group info &lt;group-spec&gt;&#13;    Display package lists of a group. Shows which packages are installed or available from a repo when -v is used.&#13;&#13;dnf [options] group install [with-optional] &lt;group-spec&gt;...&#13;    Mark the specified group installed and install packages it contains. Also include optional packages of the group if with-optional is specified.&#13;&#13;dnf [options] group list &lt;group-spec&gt;...&#13;    List all matching groups, either among installed or available groups. If nothing is specified list all known groups. Records are ordered by display_order tag defined in comps.xml file.&#13;&#13;dnf [options] group remove &lt;group-spec&gt;...&#13;    Mark the group removed and remove those packages in the group from the system which are neither comprising another installed group and were not installed explicitly by the user.&#13;&#13;dnf [options] group upgrade &lt;group-spec&gt;...&#13;    Upgrades the packages from the group and upgrades the group itself. The latter comprises of installing pacakges that were added to the group by the distribution and removing packages that got removed from the group as far as they were not installed explicitly by the user.&#13;&#13;Groups can be also be marked installed or removed without physically manipualting any packages:&#13;&#13;dnf [options] group mark install &lt;group-spec&gt;...&#13;    Mark the specified group installed. No packages will be installed by this command but the group is then considered installed.&#13;&#13;dnf [options] group mark remove &lt;group-spec&gt;...&#13;    Mark the specified group removed. No packages will be removed by this command.">group</abbr>
 
     help
     help
     history
     history
Line 38: Line 44:


== Installation ==
== Installation ==
dnf comes with Fedora since version 18, but dnf can installed by using the YUM Command:
DNF comes with Fedora since version 18, but DNF can installed by using the YUM Command:
<pre># yum install dnf</pre>
<pre># yum install dnf</pre>
As of Fedora 22, yum has been replaced with Dnf and doesn't need to be install.
As of Fedora 22, [[YUM]] has been replaced with DNF and doesn't need to be install.


== Usage ==
== Usage ==

Revision as of 09:18, 29 September 2015

DNF is a software package manager that installs, updates, and removes packages on RPM-based Linux distributions. It automatically computes dependencies and figures out what things should occur to install packages. DNF makes it easier to maintain groups of machines without having to manually update each one using rpm.

DNF is the next upcoming major version of YUM. It roughly maintains CLI compatibility with Yum and defines strict API for extensions and plugins. Plugins can modify or extend features of DNF or provide additional CLI commands on top of those mentioned below. If you know the name of such a command (including commands mentioned bellow), you may find/install the package which provides it using the appropriate virtual provide in the form of dnf-command(<alias>) where <alias> is the name of the command; e.g. dnf-command(repoquery) for a repoquery command (the same applies to specifying dependencies of packages that require a particular command).

DNF

RPM package dnf
Added in Fedora 18, and later versions
Website http://dnf.baseurl.org/

BugsBodhiKoji

Available commands

autoremove

check-update

clean

distro-sync

downgrade

group

   help
   history
   info
   install
   list
   makecache
   mark
   provides
   reinstall
   remove
   repolist
   repository-packages
   search
   updateinfo
   upgrade
   upgrade-to

Installation

DNF comes with Fedora since version 18, but DNF can installed by using the YUM Command:

# yum install dnf

As of Fedora 22, YUM has been replaced with DNF and doesn't need to be install.

Usage

In the basic methods, dnf can be used almost exactly as YUM:

# sudo dnf search audacity 
# sudo dnf install audacity.x86_64 
# sudo dnf remove audacity 

Documentation

https://github.com/rpm-software-management/dnf/wiki lists two documentation links

1. Documentation Index

2. Command Reference