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 [[ | 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 | ||
Line 26: | Line 26: | ||
<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. dnf [options] group [summary] <group-spec> 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. dnf [options] group info <group-spec> Display package lists of a group. Shows which packages are installed or available from a repo when -v is used. dnf [options] group install [with-optional] <group-spec>... Mark the specified group installed and install packages it contains. Also include optional packages of the group if with-optional is specified. dnf [options] group list <group-spec>... 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. dnf [options] group remove <group-spec>... 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. dnf [options] group upgrade <group-spec>... 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. Groups can be also be marked installed or removed without physically manipualting any packages: dnf [options] group mark install <group-spec>... Mark the specified group installed. No packages will be installed by this command but the group is then considered installed. dnf [options] group mark remove <group-spec>... Mark the specified group removed. No packages will be removed by this command.">group</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. dnf [options] group [summary] <group-spec> 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. dnf [options] group info <group-spec> Display package lists of a group. Shows which packages are installed or available from a repo when -v is used. dnf [options] group install [with-optional] <group-spec>... Mark the specified group installed and install packages it contains. Also include optional packages of the group if with-optional is specified. dnf [options] group list <group-spec>... 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. dnf [options] group remove <group-spec>... 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. dnf [options] group upgrade <group-spec>... 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. Groups can be also be marked installed or removed without physically manipualting any packages: dnf [options] group mark install <group-spec>... Mark the specified group installed. No packages will be installed by this command but the group is then considered installed. dnf [options] group mark remove <group-spec>... Mark the specified group removed. No packages will be removed by this command.">group</abbr> | ||
<abbr Title="dnf help [<command>] Displays the help text for all commands. If given a command name then only displays the help for that particular command.">help</abbr> | |||
<abbr Title="The history command allows the user to view what has happened in past transactions and act according to this information (assuming the history_record configuration option is set). dnf history [list] [<spec>...] The default history action is listing information about given transactions in a table. Each <spec> can be either a <transaction-spec>, which specifies a transaction directly, or a <transaction-spec>..<transaction-spec>, which specifies a range of transactions, or a <package-name-spec>, which specifies a transaction by a package which it manipulated. When no transaction is specified, list all known transactions. dnf history info [<spec>...] Describe the given transactions. The meaning of <spec> is the same as in the History List Command. When no transaction is specified, describe what happened during the latest transaction. dnf history redo <transaction-spec> Repeat the specified transaction. If it is not possible to redo any operation due to the current state of RPMDB, do not redo any operation. dnf history rollback <transaction-spec> Undo all transactions performed after the specified transaction. If it is not possible to undo any transaction due to the current state of RPMDB, do not undo any transaction. dnf history undo <transaction-spec> Perform the opposite operation to all operations performed in the specified transaction. If it is not possible to undo any operation due to the current state of RPMDB, do not undo any operation. dnf history userinstalled List names of all packages installed by a user. The output can be used as the %packages section in a kickstart file. This command by default does not force a sync of expired metadata.">history</abbr> | |||
<abbr Title="dnf [options] info [<package-spec>...] Is used to list description and summary information about available packages. This command by default does not force a sync of expired metadata.">info</abbr> | |||
<abbr Title="dnf [options] install <spec>... Make sure that the given packages and their dependencies can be installed on the system. Each <spec> can be either a <package-spec>, which specifies a package directly, or a path to the local rpm package, or an URL to a remote rpm package, or a @<group-spec>, which specifies an (environment) group which contains it. If a given package cannot be (and is not already) installed, the exit code will be non-zero. Please make sure that you understand which package will be selected in case of multiple matches.">install</abbr> | |||
<abbr Title="Dumps lists of packages depending on the packages’ relation to the system. A package is installed if it is present in the RPMDB, and it is available if it is not installed but it is present in a repository that DNF knows about. The list command can also limit the displayed packages according to other criteria, e.g. to only those that update an installed package. All the forms take a [<package-specs>...] parameter to further limit the result to only those packages matching it. dnf [options] list [all] [<package-name-specs>...] Lists all packages known to us, present in the RPMDB, in a repo or in both. dnf [options] list installed [<package-name-specs>...] Lists installed packages. dnf [options] list available [<package-name-specs>...] Lists available packages. dnf [options] list extras [<package-name-specs>...] Lists extras, that is packages installed on the system that are not available in any known repository. dnf [options] list obsoletes [<package-name-specs>...] List the packages installed on the system that are obsoleted by packages in any known repository. dnf [options] list recent [<package-name-specs>...] List packages recently added into the repositories. dnf [options] list upgrades [<package-name-specs>...] List upgrades available for the installed packages. dnf [options] list autoremove List packages which will be removed by dnf autoremove command. This command by default does not force a sync of expired metadata.">list</abbr> | |||
<abbr Title="dnf [options] makecache Downloads and caches in binary format metadata for all known repos. Tries to avoid downloading whenever possible (e.g. when the local metadata hasn’t expired yet or when the metadata timestamp hasn’t changed). dnf [options] makecache timer Like plain makecache but instructs DNF to be more resource-aware, meaning will not do anything if running on battery power and will terminate immediately if it’s too soon after the last successful makecache run.">makecache</abbr> | |||
<abbr Title="dnf mark install <package-specs>... Marks the specified packages as installed by user. This can be useful if any package was installed as a dependency and is desired to stay on the system when Auto Remove Command or Remove Command along with clean_requirements_on_remove configuration option set to True is executed. dnf mark remove <package-specs>... Unmarks the specified packages as installed by user. Whenever you as a user don’t need a specific package you can mark it for removal. The package stay still installed on the system and will removed when Auto Remove Command or Remove Command along with clean_requirements_on_remove configuration option set to True is executed. You should use this operation instead of Remove Command if your not sure whether the package is a requirement of other user installed package on the system.">mark</abbr> | |||
<abbr Title="dnf [options] provides <provide-spec> Finds the packages providing the given <provide-spec>. This is useful when one knows a filename and wants to find what package (installed or not) provides this file. This command by default does not force a sync of expired metadata.">provides</abbr> | |||
<abbr Title="dnf [options] reinstall <package-specs>... Installs the specified packages, fails if some of the packages are either not installed or not available (i.e. there is no repository where to download the same RPM).">reinstall</abbr> | |||
remove | remove | ||
repolist | repolist | ||
Line 44: | Line 53: | ||
== Installation == | == Installation == | ||
DNF comes with Fedora since version 18, but DNF can installed by using the | 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, [[ | As of Fedora 22, [[Yum]] has been replaced with DNF and doesn't need to be install. | ||
== Usage == | == Usage == |
Revision as of 10:16, 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/ |
Bugs • Bodhi • Koji |
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