1DNF(8) DNF DNF(8)
2
3
4
6 dnf - DNF Command Reference
7
9 dnf [options] <command> [<args>...]
10
12 DNF is the next upcoming major version of YUM, a package manager for
13 RPM-based Linux distributions. It roughly maintains CLI compatibility
14 with YUM and defines a strict API for extensions and plugins.
15
16 Plugins can modify or extend features of DNF or provide additional CLI
17 commands on top of those mentioned below. If you know the name of such
18 a command (including commands mentioned below), you may find/install
19 the package which provides it using the appropriate virtual provide in
20 the form of dnf-command(<alias>), where <alias> is the name of the com‐
21 mand; e.g.``dnf install 'dnf-command(versionlock)'`` installs a ver‐
22 sionlock plugin. This approach also applies to specifying dependencies
23 of packages that require a particular DNF command.
24
25 Return values:
26
27 · 0 : Operation was successful.
28
29 · 1 : An error occurred, which was handled by dnf.
30
31 · 3 : An unknown unhandled error occurred during operation.
32
33 · 100: See check-update
34
35 · 200: There was a problem with acquiring or releasing of locks.
36
37 Available commands:
38
39 · alias
40
41 · autoremove
42
43 · check
44
45 · check-update
46
47 · clean
48
49 · distro-sync
50
51 · downgrade
52
53 · group
54
55 · help
56
57 · history
58
59 · info
60
61 · install
62
63 · list
64
65 · makecache
66
67 · mark
68
69 · module
70
71 · provides
72
73 · reinstall
74
75 · remove
76
77 · repoinfo
78
79 · repolist
80
81 · repoquery
82
83 · repository-packages
84
85 · search
86
87 · shell
88
89 · swap
90
91 · updateinfo
92
93 · upgrade
94
95 · upgrade-minimal
96
97 · upgrade-to
98
99 Additional information:
100
101 · Options
102
103 · Specifying Packages
104
105 · Specifying Exact Versions of Packages
106
107 · Specifying Provides
108
109 · Specifying Groups
110
111 · Specifying Transactions
112
113 · Metadata Synchronization
114
115 · Configuration Files Replacement Policy
116
117 · Files
118
119 · See Also
120
122 -4 Resolve to IPv4 addresses only.
123
124 -6 Resolve to IPv6 addresses only.
125
126 --advisory=<advisory>, --advisories=<advisory>
127 Include packages corresponding to the advisory ID, Eg.
128 FEDORA-2201-123. Applicable for the install, repoquery, update‐
129 info and upgrade commands.
130
131 --allowerasing
132 Allow erasing of installed packages to resolve dependencies.
133 This option could be used as an alternative to the yum swap com‐
134 mand where packages to remove are not explicitly defined.
135
136 --assumeno
137 Automatically answer no for all questions.
138
139 -b, --best
140 Try the best available package versions in transactions. Specif‐
141 ically during dnf upgrade, which by default skips over updates
142 that can not be installed for dependency reasons, the switch
143 forces DNF to only consider the latest packages. When running
144 into packages with broken dependencies, DNF will fail giving a
145 reason why the latest version can not be installed.
146
147 --bugfix
148 Include packages that fix a bugfix issue. Applicable for the
149 install, repoquery, updateinfo and upgrade commands.
150
151 --bz=<bugzilla>, --bzs=<bugzilla>
152 Include packages that fix a Bugzilla ID, Eg. 123123. Applicable
153 for the install, repoquery, updateinfo and upgrade commands.
154
155 -C, --cacheonly
156 Run entirely from system cache, don't update the cache and use
157 it even in case it is expired.
158
159 DNF uses a separate cache for each user under which it executes.
160 The cache for the root user is called the system cache. This
161 switch allows a regular user read-only access to the system
162 cache, which usually is more fresh than the user's and thus he
163 does not have to wait for metadata sync.
164
165 --color=<color>
166 Control whether color is used in terminal output. Valid values
167 are always, never and auto (default).
168
169 --comment=<comment>
170 Add a comment to the transaction history.
171
172 -c <config file>, --config=<config file>
173 Configuration file location.
174
175 --cve=<cves>, --cves=<cves>
176 Include packages that fix a CVE (Common Vulnerabilities and
177 Exposures) ID (http://cve.mitre.org/about/), Eg. CVE-2201-0123.
178 Applicable for the install, repoquery, updateinfo, and upgrade
179 commands.
180
181 -d <debug level>, --debuglevel=<debug level>
182 Debugging output level. This is an integer value between 0 (no
183 additional information strings) and 10 (shows all debugging
184 information, even that not understandable to the user), default
185 is 2. Deprecated, use -v instead.
186
187 --debugsolver
188 Dump data aiding in dependency solver debugging into ./debug‐
189 data.
190
191 --disableexcludes=[all|main|<repoid>], --disableexcludep‐
192 kgs=[all|main|<repoid>]
193 Disable the configuration file excludes. Takes one of the following
194 three options:
195
196 · all, disables all configuration file excludes
197
198 · main, disables excludes defined in the [main] section
199
200 · repoid, disables excludes defined for the given repository
201
202 --disable, --set-disabled
203 Disable specified repositories (automatically saves). The option
204 has to be used together with the config-manager command
205 (dnf-plugins-core).
206
207 --disableplugin=<plugin names>
208 Disable the listed plugins specified by names or globs.
209
210 --disablerepo=<repoid>
211 Disable specific repositories by an id or a glob. This option is
212 mutually exclusive with --repo.
213
214 --downloaddir=<path>, --destdir=<path>
215 Redirect downloaded packages to provided directory. The option
216 has to be used together with the --downloadonly command line
217 option, with the download command (dnf-plugins-core) or with the
218 system-upgrade command (dnf-plugins-extras).
219
220 --downloadonly
221 Download the resolved package set without performing any rpm
222 transaction (install/upgrade/erase).
223
224 -e <error level>, --errorlevel=<error level>
225 Error output level. This is an integer value between 0 (no error
226 output) and 10 (shows all error messages), default is 3. Depre‐
227 cated, use -v instead.
228
229 --enable, --set-enabled
230 Enable specified repositories (automatically saves). The option
231 has to be used together with the config-manager command
232 (dnf-plugins-core).
233
234 --enableplugin=<plugin names>
235 Enable the listed plugins specified by names or globs.
236
237 --enablerepo=<repoid>
238 Enable additional repositories by an id or a glob.
239
240 --enhancement
241 Include enhancement relevant packages. Applicable for the
242 install, repoquery, updateinfo and upgrade commands.
243
244 -x <package-spec>, --exclude=<package-spec>
245 Exclude packages specified by <package-spec> from the operation.
246
247 --excludepkgs=<package-spec>
248 Deprecated option. It was replaced by the --exclude option.
249
250 --forcearch=<arch>
251 Force the use of an architecture. Any architecture can be speci‐
252 fied. However, use of an architecture not supported natively by
253 your CPU will require emulation of some kind. This is usually
254 through QEMU. The behavior of --forcearch can be configured by
255 using the arch and ignorearch configuration options with values
256 <arch> and True respectively.
257
258 -h, --help, --help-cmd
259 Show the help.
260
261 --installroot=<path>
262 Specifies an alternative installroot, relative to where all
263 packages will be installed. Think of this like doing chroot
264 <root> dnf, except using --installroot allows dnf to work before
265 the chroot is created. It requires absolute path.
266
267 · cachedir, log files, releasever, and gpgkey are taken from or stored
268 in the installroot. Gpgkeys are imported into the installroot from a
269 path relative to the host which can be specified in the repository
270 section of configuration files.
271
272 · configuration file and reposdir are searched inside the installroot
273 first. If they are not present, they are taken from the host system.
274 Note: When a path is specified within a command line argument
275 (--config=<config file> in case of configuration file and
276 --setopt=reposdir=<reposdir> for reposdir) then this path is always
277 relative to the host with no exceptions.
278
279 · The pluginpath and pluginconfpath are relative to the host.
280 Note: You may also want to use the command-line option --relea‐
281 sever=<release> when creating the installroot, otherwise the $relea‐
282 sever value is taken from the rpmdb within the installroot (and thus
283 it is empty at the time of creation and the transaction will fail).
284 If --releasever=/ is used, the releasever will be detected from the
285 host (/) system. The new installroot path at the time of creation
286 does not contain the repository, releasever and dnf.conf files.
287
288 On a modular system you may also want to use the --setopt=mod‐
289 ule_platform_id=<module_platform_name:stream> command-line option
290 when creating the installroot, otherwise the module_platform_id
291 value will be taken from the /etc/os-release file within the
292 installroot (and thus it will be empty at the time of creation, the
293 modular dependency could be unsatisfied and modules content could be
294 excluded).
295
296 Installroot examples:
297
298 dnf --installroot=<installroot> --releasever=<release> install sys‐
299 tem-release
300 Permanently sets the releasever of the system in the
301 <installroot> directory to <release>.
302
303 dnf --installroot=<installroot> --setopt=reposdir=<path> --config
304 /path/dnf.conf upgrade
305 Upgrades packages inside the installroot from a repository
306 described by --setopt using configuration from
307 /path/dnf.conf.
308
309 --newpackage
310 Include newpackage relevant packages. Applicable for the
311 install, repoquery, updateinfo and upgrade commands.
312
313 --noautoremove
314 Disable removal of dependencies that are no longer used. It sets
315 clean_requirements_on_remove configuration option to False.
316
317 --nobest
318 Set best option to False, so that transactions are not limited
319 to best candidates only.
320
321 --nodocs
322 Do not install documentation. Sets the rpm flag 'RPM‐
323 TRANS_FLAG_NODOCS'.
324
325 --nogpgcheck
326 Skip checking GPG signatures on packages (if RPM policy allows).
327
328 --noplugins
329 Disable all plugins.
330
331 --obsoletes
332 This option has an effect on an install/update, it enables dnf's
333 obsoletes processing logic. For more information see the obso‐
334 letes option.
335
336 This option also displays capabilities that the package obso‐
337 letes when used togehter with the repoquery command.
338
339 Configuration Option: obsoletes
340
341 -q, --quiet
342 In combination with a non-interactive command, shows just the
343 relevant content. Suppresses messages notifying about the cur‐
344 rent state or actions of DNF.
345
346 -R <minutes>, --randomwait=<minutes>
347 Maximum command wait time.
348
349 --refresh
350 Set metadata as expired before running the command.
351
352 --releasever=<release>
353 Configure DNF as if the distribution release was <release>. This
354 can affect cache paths, values in configuration files and mir‐
355 rorlist URLs.
356
357 --repofrompath <repo>,<path/url>
358 Specify a path or url to a repository (same path as in a
359 baseurl) to add to the repositories for this query. This option
360 can be used multiple times. The repository label for the reposi‐
361 tory is specified by <repo>. If you want to view only packages
362 from this repository, combine this with the --repo=<repo> or
363 --disablerepo="*" switches. The repository label for the repos‐
364 itory is specified by <repo>. The configuration for the repo
365 could be adjusted using --setopt=<repo>.<option>=<value>.
366
367 --repo=<repoid>, --repoid=<repoid>
368 Enable just specific repositories by an id or a glob. Can be
369 used multiple times with accumulative effect. It is basically a
370 shortcut for --disablerepo="*" --enablerepo=<repoid> and is
371 mutually exclusive with the --disablerepo option.
372
373 --rpmverbosity=<name>
374 RPM debug scriptlet output level. Sets the debug level to <name>
375 for RPM scriptlets. For available levels, see the rpmverbosity
376 configuration option.
377
378 --sec-severity=<severity>, --secseverity=<severity>
379 Includes packages that provide a fix for an issue of the speci‐
380 fied severity. Applicable for the install, repoquery, update‐
381 info and upgrade commands.
382
383 --security
384 Includes packages that provide a fix for a security issue.
385 Applicable for the upgrade command.
386
387 --setopt=<option>=<value>
388 Override a configuration option from the configuration file. To
389 override configuration options for repositories, use
390 repoid.option for the <option>. Values for configuration options
391 like excludepkgs, includepkgs, installonlypkgs and tsflags are
392 appended to the original value, they do not override it. How‐
393 ever, specifying an empty value (e.g. --setopt=tsflags=) will
394 clear the option.
395
396 --skip-broken
397 Resolve depsolve problems by removing packages that are causing
398 problems from the transaction. It is an alias for the strict
399 configuration option with value False. Additionally, with the
400 enable and disable module subcommands it allows to perform an
401 action even in case of broken modular dependencies.
402
403 --showduplicates
404 Show duplicate packages in repositories. Applicable for the list
405 and search commands.
406
407 -v, --verbose
408 Verbose operation, show debug messages.
409
410 --version
411 Show DNF version and exit.
412
413 -y, --assumeyes
414 Automatically answer yes for all questions.
415
416 List options are comma-separated. Command-line options override respec‐
417 tive settings from configuration files.
418
420 For an explanation of <package-spec> and <package-name-spec> see
421 Specifying Packages.
422
423 For an explanation of <package-nevr-spec> see Specifying Exact Versions
424 of Packages.
425
426 For an explanation of <provide-spec> see Specifying Provides.
427
428 For an explanation of <group-spec> see Specifying Groups.
429
430 For an explanation of <module-spec> see Specifying Modules.
431
432 For an explanation of <transaction-spec> see Specifying Transactions.
433
434 Alias Command
435 Allows the user to define and manage a list of aliases (in the form
436 <name=value>), which can be then used as dnf commands to abbreviate
437 longer command sequences. For examples on using the alias command, see
438 Alias Examples. For examples on the alias processing, see Alias Pro‐
439 cessing Examples.
440
441 To use an alias (name=value), the name must be placed as the first
442 "command" (e.g. the first argument that is not an option). It is then
443 replaced by its value and the resulting sequence is again searched for
444 aliases. The alias processing stops when the first found command is not
445 a name of any alias.
446
447 Also, like in shell aliases, if the result starts with a \, the alias
448 processing will stop.
449
450 All aliases are defined in configuration files in the
451 /etc/dnf/aliases.d/ directory in the [aliases] section, and aliases
452 created by the alias command are written to the USER.conf file.
453 Optionally, there is the enabled option in the [main] section default‐
454 ing to True. This can be set for each file separately in the respective
455 file, or globaly for all aliases in the ALIASES.conf file.
456
457 dnf alias [options] [list] [<name>...]
458 List aliases with their final result. The [<alias>...] parameter
459 further limits the result to only those aliases matching it.
460
461 dnf alias [options] add <name=value>...
462 Create new aliases.
463
464 dnf alias [options] delete <name>...
465 Delete aliases.
466
467 Alias Examples
468 dnf alias list
469 Lists all defined aliases.
470
471 dnf alias add rm=remove
472 Adds new alias command called "rm" which does the same thing as
473 the command "remove".
474
475 dnf alias add update="\update --skip-broken --disableexcludes=all
476 --obsoletes"
477 Adds new alias command called "update" which does the same thing
478 as the command "update", but with options --skip-broken --dis‐
479 ableexcludes=all --obsoletes.
480
481 Alias Processing Examples
482 If there are defined aliases in=install and FORCE="--skip-broken --dis‐
483 ableexcludes=all":
484
485 · dnf FORCE in will be replaced with dnf --skip-broken --disableex‐
486 cludes=all install
487
488 · dnf in FORCE will be replaced with dnf install FORCE (which will
489 fail)
490
491 If there is defined alias in=install:
492
493 · dnf in will be replaced with dnf install
494
495 · dnf --repo updates in will be replaced with dnf --repo updates in
496 (which will fail)
497
498 Auto Remove Command
499 dnf [options] autoremove
500 Removes all "leaf" packages from the system that were originally
501 installed as dependencies of user-installed packages, but which are
502 no longer required by any such package.
503
504 Packages listed in installonlypkgs are never automatically removed by
505 this command.
506
507 dnf [options] autoremove <spec>...
508 This is an alias for the Remove Command command with clean_require‐
509 ments_on_remove set to True. It removes the specified packages from
510 the system along with any packages depending on the packages being
511 removed. Each <spec> can be either a <package-spec>, which specifies
512 a package directly, or a @<group-spec>, which specifies an (environ‐
513 ment) group which contains it. It also removes any dependencies that
514 are no longer needed.
515
516 There are also a few specific autoremove commands autoremove-n,
517 autoremove-na and autoremove-nevra that allow the specification of
518 an exact argument in the NEVRA (name-epoch:version-release.architec‐
519 ture) format.
520
521 This command by default does not force a sync of expired metadata. See
522 also Metadata Synchronization.
523
524 Check Command
525 dnf [options] check [--dependencies] [--duplicates] [--obsoleted]
526 [--provides]
527 Checks the local packagedb and produces information on any problems
528 it finds. You can limit the checks to be performed by using the
529 --dependencies, --duplicates, --obsoleted and --provides options
530 (the default is to check everything).
531
532 Check-Update Command
533 dnf [options] check-update [--changelogs] [<package-specs>...]
534 Non-interactively checks if updates of the specified packages are
535 available. If no <package-specs> are given, checks whether any
536 updates at all are available for your system. DNF exit code will be
537 100 when there are updates available and a list of the updates will
538 be printed, 0 if not and 1 if an error occurs. If --changelogs
539 option is specified, also changelog delta of packages about to be
540 updated is printed.
541
542 Please note that having a specific newer version available for an
543 installed package (and reported by check-update) does not imply that
544 subsequent dnf upgrade will install it. The difference is that dnf
545 upgrade has restrictions (like package dependencies being satisfied)
546 to take into account.
547
548 The output is affected by the autocheck_running_kernel configuration
549 option.
550
551 Clean Command
552 Performs cleanup of temporary files kept for repositories. This
553 includes any such data left behind from disabled or removed reposito‐
554 ries as well as for different distribution release versions.
555
556 dnf clean dbcache
557 Removes cache files generated from the repository metadata. This
558 forces DNF to regenerate the cache files the next time it is
559 run.
560
561 dnf clean expire-cache
562 Marks the repository metadata expired. DNF will re-validate the
563 cache for each repository the next time it is used.
564
565 dnf clean metadata
566 Removes repository metadata. Those are the files which DNF uses
567 to determine the remote availability of packages. Using this
568 option will make DNF download all the metadata the next time it
569 is run.
570
571 dnf clean packages
572 Removes any cached packages from the system.
573
574 dnf clean all
575 Does all of the above.
576
577 Distro-Sync command
578 dnf distro-sync [<package-spec>...]
579 As necessary upgrades, downgrades or keeps selected installed
580 packages to match the latest version available from any enabled
581 repository. If no package is given, all installed packages are
582 considered.
583
584 See also Configuration Files Replacement Policy.
585
586 Distribution-Synchronization command
587 dnf distribution-synchronization
588 Deprecated alias for the Distro-Sync command.
589
590 Downgrade Command
591 dnf [options] downgrade <package-installed-specs>...
592 Downgrades the specified packages to the highest installable
593 package of all known lower versions if possible. When version is
594 given and is lower than version of installed package then it
595 downgrades to target version.
596
597 Erase Command
598 dnf [options] erase <spec>...
599 Deprecated alias for the Remove Command.
600
601 Group Command
602 Groups are virtual collections of packages. DNF keeps track of groups
603 that the user selected ("marked") installed and can manipulate the com‐
604 prising packages with simple commands.
605
606 dnf [options] group [summary] <group-spec>
607 Display overview of how many groups are installed and available.
608 With a spec, limit the output to the matching groups. summary is
609 the default groups subcommand.
610
611 dnf [options] group info <group-spec>
612 Display package lists of a group. Shows which packages are
613 installed or available from a repository when -v is used.
614
615 dnf [options] group install [--with-optional] <group-spec>...
616 Mark the specified group installed and install packages it con‐
617 tains. Also include optional packages of the group if
618 --with-optional is specified. All mandatory and Default packages
619 will be installed whenever possible. Conditional packages are
620 installed if they meet their requirement. If the group is
621 already (partially) installed, the command installs the missing
622 packages from the group.
623
624 dnf [options] group list <group-spec>...
625 List all matching groups, either among installed or available
626 groups. If nothing is specified, list all known groups.
627 --installed and --available options narrow down the requested
628 list. Records are ordered by the display_order tag defined in
629 comps.xml file. Provides a list of all hidden groups by using
630 option --hidden. Provides more detailed information when the -v
631 option is used.
632
633 dnf [options] group remove <group-spec>...
634 Mark the group removed and remove those packages in the group
635 from the system which do not belong to another installed group
636 and were not installed explicitly by the user.
637
638 dnf [options] group upgrade <group-spec>...
639 Upgrades the packages from the group and upgrades the group
640 itself. The latter comprises of installing packages that were
641 added to the group by the distribution and removing packages
642 that got removed from the group as far as they were not
643 installed explicitly by the user.
644
645 Groups can also be marked installed or removed without physically
646 manipulating any packages:
647
648 dnf [options] group mark install <group-spec>...
649 Mark the specified group installed. No packages will be
650 installed by this command, but the group is then considered
651 installed.
652
653 dnf [options] group mark remove <group-spec>...
654 Mark the specified group removed. No packages will be removed by
655 this command.
656
657 See also Configuration Files Replacement Policy.
658
659 Groups Command
660 dnf [options] groups
661 Deprecated alias for the Group Command.
662
663 Help Command
664 dnf help [<command>]
665 Displays the help text for all commands. If given a command name
666 then only displays help for that particular command.
667
668 History Command
669 The history command allows the user to view what has happened in past
670 transactions and act according to this information (assuming the his‐
671 tory_record configuration option is set).
672
673 dnf history [list] [<spec>...]
674 The default history action is listing information about given
675 transactions in a table. Each <spec> can be either a <transac‐
676 tion-spec>, which specifies a transaction directly, or a <trans‐
677 action-spec>..<transaction-spec>, which specifies a range of
678 transactions, or a <package-name-spec>, which specifies a trans‐
679 action by a package which it manipulated. When no transaction is
680 specified, list all known transactions.
681
682 dnf history info [<spec>...]
683 Describe the given transactions. The meaning of <spec> is the
684 same as in the History List Command. When no transaction is
685 specified, describe what happened during the latest transaction.
686
687 dnf history redo <transaction-spec>|<package-name-spec>
688 Repeat the specified transaction. Uses the last transaction
689 (with the highest ID) if more than one transaction for given
690 <package-name-spec> is found. If it is not possible to redo some
691 operations due to the current state of RPMDB, it will not redo
692 the transaction.
693
694 dnf history rollback <transaction-spec>|<package-name-spec>
695 Undo all transactions performed after the specified transaction.
696 Uses the last transaction (with the highest ID) if more than one
697 transaction for given <package-name-spec> is found. If it is
698 not possible to undo some transactions due to the current state
699 of RPMDB, it will not undo any transaction.
700
701 dnf history undo <transaction-spec>|<package-name-spec>
702 Perform the opposite operation to all operations performed in
703 the specified transaction. Uses the last transaction (with the
704 highest ID) if more than one transaction for given <pack‐
705 age-name-spec> is found. If it is not possible to undo some
706 operations due to the current state of RPMDB, it will not undo
707 the transaction.
708
709 dnf history userinstalled
710 Show all installonly packages, packages installed outside of DNF
711 and packages not installed as dependency. I.e. it lists packages
712 that will stay on the system when Auto Remove Command or Remove
713 Command along with clean_requirements_on_remove configuration
714 option set to True is executed. Note the same results can be
715 accomplished with dnf repoquery --userinstalled, and the repo‐
716 query command is more powerful in formatting of the output.
717
718 This command by default does not force a sync of expired metadata,
719 except for the redo, rollback, and undo subcommands. See also Metadata
720 Synchronization and Configuration Files Replacement Policy.
721
722 Info Command
723 dnf [options] info [<package-name-spec>...]
724 Lists description and summary information about installed and
725 available packages.
726
727 This command by default does not force a sync of expired metadata. See
728 also Metadata Synchronization.
729
730 Install Command
731 dnf [options] install <spec>...
732 Makes sure that the given packages and their dependencies are
733 installed on the system. Each <spec> can be either a
734 <package-spec>, or a @<module-spec>, or a @<group-spec>. See
735 Install Examples. If a given package or provide cannot be (and
736 is not already) installed, the exit code will be non-zero. If
737 the <spec> matches both a @<module-spec> and a @<group-spec>,
738 only the module is installed.
739
740 When <package-spec> to specify the exact version of the package
741 is given, DNF will install the desired version, no matter which
742 version of the package is already installed. The former version
743 of the package will be removed in the case of non-installonly
744 package.
745
746 There are also a few specific install commands install-n,
747 install-na and install-nevra that allow the specification of an
748 exact argument in the NEVRA format.
749
750 See also Configuration Files Replacement Policy.
751
752 Install Examples
753 dnf install tito
754 Install the tito package (tito is the package name).
755
756 dnf install ~/Downloads/tito-0.6.2-1.fc22.noarch.rpm
757 Install a local rpm file tito-0.6.2-1.fc22.noarch.rpm from the
758 ~/Downloads/ directory.
759
760 dnf install tito-0.5.6-1.fc22
761 Install the package with a specific version. If the package is
762 already installed it will automatically try to downgrade or
763 upgrade to the specific version.
764
765 dnf --best install tito
766 Install the latest available version of the package. If the
767 package is already installed it will try to automatically
768 upgrade to the latest version. If the latest version of the
769 package cannot be installed, the installation will fail.
770
771 dnf install vim
772 DNF will automatically recognize that vim is not a package name,
773 but will look up and install a package that provides vim with
774 all the required dependencies. Note: Package name match has
775 precedence over package provides match.
776
777 dnf install https://kojipkgs.fedoraproject.org//pack‐
778 ages/tito/0.6.0/1.fc22/noarch/tito-0.6.0-1.fc22.noarch.rpm
779 Install a package directly from a URL.
780
781 dnf install '@docker'
782 Install all default profiles of module 'docker' and their RPMs.
783 Module streams get enabled accordingly.
784
785 dnf install '@Web Server'
786 Install the 'Web Server' environmental group.
787
788 dnf install /usr/bin/rpmsign
789 Install a package that provides the /usr/bin/rpmsign file.
790
791 dnf -y install tito --setopt=install_weak_deps=False
792 Install the tito package (tito is the package name) without weak
793 deps. Weak deps are not required for core functionality of the
794 package, but they enhance the original package (like extended
795 documentation, plugins, additional functions, etc.).
796
797 dnf install --advisory=FEDORA-2018-b7b99fe852 \*
798 Install all packages that belong to the "FEDORA-2018-b7b99fe852"
799 advisory.
800
801 List Command
802 Prints lists of packages depending on the packages' relation to the
803 system. A package is installed if it is present in the RPMDB, and it is
804 available if it is not installed but is present in a repository that
805 DNF knows about. The list command can also limit the displayed pack‐
806 ages according to specific criteria, e.g. to only those that update an
807 installed package. The exclude option in the configuration file can
808 influence the result, but if the --disableexcludes command line option
809 is used, it ensures that all installed packages will be listed.
810
811 All the forms take the [<package-specs>...] parameter to further limit
812 the result to only packages that matching it.
813
814 dnf [options] list [--all] [<package-name-specs>...]
815 Lists all packages, present in the RPMDB, in a repository or
816 both.
817
818 dnf [options] list --installed [<package-name-specs>...]
819 Lists installed packages.
820
821 dnf [options] list --available [<package-name-specs>...]
822 Lists available packages.
823
824 dnf [options] list --extras [<package-name-specs>...]
825 Lists extras, that is packages installed on the system that are
826 not available in any known repository.
827
828 dnf [options] list --obsoletes [<package-name-specs>...]
829 List packages installed on the system that are obsoleted by
830 packages in any known repository.
831
832 dnf [options] list --recent [<package-name-specs>...]
833 List packages recently added into the repositories.
834
835 dnf [options] list --upgrades [<package-name-specs>...]
836 List upgrades available for the installed packages.
837
838 dnf [options] list --autoremove
839 List packages which will be removed by the dnf autoremove com‐
840 mand.
841
842 This command by default does not force a sync of expired metadata. See
843 also Metadata Synchronization.
844
845 Localinstall Command
846 dnf [options] localinstall <spec>...
847 Deprecated alias for the Install Command.
848
849 Makecache Command
850 dnf [options] makecache
851 Downloads and caches metadata for all known repos. Tries to
852 avoid downloading whenever possible (e.g. when the local meta‐
853 data hasn't expired yet or when the metadata timestamp hasn't
854 changed).
855
856 dnf [options] makecache --timer
857 Like plain makecache, but instructs DNF to be more
858 resource-aware, meaning it will not do anything if running on
859 battery power and will terminate immediately if it's too soon
860 after the last successful makecache run (see dnf.conf(5), meta‐
861 data_timer_sync).
862
863 Mark Command
864 dnf mark install <package-specs>...
865 Marks the specified packages as installed by user. This can be
866 useful if any package was installed as a dependency and is
867 desired to stay on the system when Auto Remove Command or Remove
868 Command along with clean_requirements_on_remove configuration
869 option set to True is executed.
870
871 dnf mark remove <package-specs>...
872 Unmarks the specified packages as installed by user. Whenever
873 you as a user don't need a specific package you can mark it for
874 removal. The package stays installed on the system but will be
875 removed when Auto Remove Command or Remove Command along with
876 clean_requirements_on_remove configuration option set to True is
877 executed. You should use this operation instead of Remove Com‐
878 mand if you're not sure whether the package is a requirement of
879 other user installed packages on the system.
880
881 dnf mark group <package-specs>...
882 Marks the specified packages as installed by group. This can be
883 useful if any package was installed as a dependency or a user
884 and is desired to be protected and handled as a group member
885 like during group remove.
886
887 Module Command
888 Module subcommands take <module-spec>... arguments that specify modules
889 or profiles.
890
891 dnf [options] module install <module-spec>...
892 Install module profiles, including their packages. In case no
893 profile was provided, all default profiles get installed. Mod‐
894 ule streams get enabled accordingly.
895
896 This command cannot be used for switching module streams. It is
897 recommended to remove all installed content from the module and
898 reset the module using the reset command. After you reset the
899 module, you can install the other stream.
900
901 dnf [options] module update <module-spec>...
902 Update packages associated with an active module stream, option‐
903 ally restricted to a profile. If the profile_name is provided,
904 only the packages referenced by that profile will be updated.
905
906 dnf [options] module remove <module-spec>...
907 Remove installed module profiles, including their packages. In
908 case no profile was provided, all installed profiles get
909 removed.
910
911 dnf [options] module enable <module-spec>...
912 Enable a module stream and make the stream RPMs available in the
913 package set.
914
915 Modular dependencies are resolved, dependencies checked and also
916 recursively enabled. In case of modular dependency issue the
917 operation will be rejected. To perform the action anyway please
918 use --skip-broken option.
919
920 This command cannot be used for switching module streams. It is
921 recommended to remove all installed content from the module, and
922 reset the module using the reset command. After you reset the
923 module, you can enable the other stream.
924
925 dnf [options] module disable <module-name>...
926 Disable a module. All related module streams will become
927 unavailable. In case of modular dependency issue the operation
928 will be rejected. To perform the action anyway please use -‐
929 -skip-broken option.
930
931 dnf [options] module reset <module-name>...
932 Reset module state so it's no longer enabled or disabled.
933
934 dnf [options] module list [--all] [module_name...]
935 Lists all module streams, their profiles and states (enabled,
936 disabled, default).
937
938 dnf [options] module list --enabled [module_name...]
939 Lists module streams that are enabled.
940
941 dnf [options] module list --disabled [module_name...]
942 Lists module streams that are disabled.
943
944 dnf [options] module list --installed [module_name...]
945 List module streams with installed profiles.
946
947 dnf [options] module info <module-spec>...
948 Print detailed information about given module stream.
949
950 dnf [options] module info --profile <module-spec>...
951 Print detailed information about given module profiles.
952
953 Provides Command
954 dnf [options] provides <provide-spec>
955 Finds the packages providing the given <provide-spec>. This is
956 useful when one knows a filename and wants to find what package
957 (installed or not) provides this file.
958
959 This command by default does not force a sync of expired metadata. See
960 also Metadata Synchronization.
961
962 Reinstall Command
963 dnf [options] reinstall <package-specs>...
964 Installs the specified packages, fails if some of the packages
965 are either not installed or not available (i.e. there is no
966 repository where to download the same RPM).
967
968 Remove Command
969 dnf [options] remove <package-specs>...
970 Removes the specified packages from the system along with any
971 packages depending on the packages being removed. Each <spec>
972 can be either a <package-spec>, which specifies a package
973 directly, or a @<group-spec>, which specifies an (environment)
974 group which contains it. If clean_requirements_on_remove is
975 enabled (the default), also removes any dependencies that are no
976 longer needed.
977
978 dnf [options] remove --duplicates
979 Removes older version of duplicated packages.
980
981 dnf [options] remove --oldinstallonly
982 Removes old installonly packages, keeping only installonly_limit
983 latest versions.
984
985 There are also a few specific remove commands remove-n,
986 remove-na and remove-nevra that allow the specification of an
987 exact argument in the NEVRA format.
988
989 Remove Examples
990 dnf remove acpi tito
991 Remove the acpi and tito packages.
992
993 dnf remove $(dnf repoquery --extras --exclude=tito,acpi)
994 Remove packages not present in any repository, but don't remove
995 the tito and acpi packages (they still might be removed if they
996 depend on some of the removed packages).
997
998 Remove older versions of duplicated packages (an equivalent of yum's
999 package-cleanup --cleandups):
1000
1001 dnf remove --duplicates
1002
1003 Repoinfo Command
1004 An alias for the repolist command that provides more detailed infor‐
1005 mation like dnf repolist -v.
1006
1007 Repolist Command
1008 dnf [options] repolist [--enabled|--disabled|--all]
1009 Depending on the exact command lists enabled, disabled or all
1010 known repositories. Lists all enabled repositories by default.
1011 Provides more detailed information when -v option is used.
1012
1013 This command by default does not force a sync of expired metadata. See
1014 also Metadata Synchronization.
1015
1016 Repoquery Command
1017 dnf [options] repoquery [<select-options>] [<query-options>]
1018 [<pkg-spec>]
1019 Searches available DNF repositories for selected packages and
1020 displays the requested information about them. It is an equiva‐
1021 lent of rpm -q for remote repositories.
1022
1023 dnf [options] repoquery --querytags
1024 Provides the list of tags recognized by the --queryformat repo‐
1025 query option.
1026
1027 There are also a few specific repoquery commands repoquery-n,
1028 repoquery-na and repoquery-nevra that allow the specification of
1029 an exact argument in the NEVRA format (does not affect arguments
1030 of options like --whatprovides <arg>, ...).
1031
1032 Select Options
1033 Together with <pkg-spec>, control what packages are displayed in the
1034 output. If <pkg-spec> is given, limits the resulting set of packages to
1035 those matching the specification. All packages are considered if no
1036 <pkg-spec> is specified.
1037
1038 <pkg-spec>
1039 Package specification in the NEVRA format (name[-[epoch:]ver‐
1040 sion[-release]][.arch]). See Specifying Packages.
1041
1042 -a, --all
1043 Query all packages (for rpmquery compatibility, also a shorthand
1044 for repoquery '*' or repoquery without arguments).
1045
1046 --arch <arch>[,<arch>...], --archlist <arch>[,<arch>...]
1047 Limit the resulting set only to packages of selected architec‐
1048 tures (default is all architectures). In some cases the result
1049 is affected by the basearch of the running system, therefore to
1050 run repoquery for an arch incompatible with your system use the
1051 --forcearch=<arch> option to change the basearch.
1052
1053 --duplicates
1054 Limit the resulting set to installed duplicate packages (i.e.
1055 more package versions for the same name and architecture).
1056 Installonly packages are excluded from this set.
1057
1058 --unneeded
1059 Limit the resulting set to leaves packages that were installed
1060 as dependencies so they are no longer needed. This switch lists
1061 packages that are going to be removed after executing the dnf
1062 autoremove command.
1063
1064 --available
1065 Limit the resulting set to available packages only (set by
1066 default).
1067
1068 --extras
1069 Limit the resulting set to packages that are not present in any
1070 of the available repositories.
1071
1072 -f <file>, --file <file>
1073 Limit the resulting set only to the package that owns <file>.
1074
1075 --installed
1076 Limit the resulting set to installed packages only. The exclude
1077 option in the configuration file might influence the result, but
1078 if the command line option --disableexcludes is used, it
1079 ensures that all installed packages will be listed.
1080
1081 --installonly
1082 Limit the resulting set to installed installonly packages.
1083
1084 --latest-limit <number>
1085 Limit the resulting set to <number> of latest packages for every
1086 package name and architecture. If <number> is negative, skip
1087 <number> of latest packages. For a negative <number> use the
1088 --latest-limit=<number> syntax.
1089
1090 --recent
1091 Limit the resulting set to packages that were recently edited.
1092
1093 --repo <repoid>
1094 Limit the resulting set only to packages from a repository iden‐
1095 tified by <repoid>. Can be used multiple times with accumula‐
1096 tive effect.
1097
1098 --unsatisfied
1099 Report unsatisfied dependencies among installed packages (i.e.
1100 missing requires and and existing conflicts).
1101
1102 --upgrades
1103 Limit the resulting set to packages that provide an upgrade for
1104 some already installed package.
1105
1106 --userinstalled
1107 Limit the resulting set to packages installed by the user. The
1108 exclude option in the configuration file might influence the
1109 result, but if the command line option --disableexcludes is
1110 used, it ensures that all installed packages will be listed.
1111
1112 --whatdepends <capability>
1113 Limit the resulting set only to packages that require, enhance,
1114 recommend, suggest or supplement <capability>.
1115
1116 --whatconflicts <capability>
1117 Limit the resulting set only to packages that conflict <capabil‐
1118 ity>.
1119
1120 --whatenhances <capability>
1121 Limit the resulting set only to packages that enhance <capabil‐
1122 ity>. Use --whatdepends if you want to list all depending pack‐
1123 ages.
1124
1125 --whatobsoletes <capability>
1126 Limit the resulting set only to packages that obsolete <capabil‐
1127 ity>.
1128
1129 --whatprovides <capability>
1130 Limit the resulting set only to packages that provide <capabil‐
1131 ity>.
1132
1133 --whatrecommends <capability>
1134 Limit the resulting set only to packages that recommend <capa‐
1135 bility>. Use --whatdepends if you want to list all depending
1136 packages.
1137
1138 --whatrequires <capability>
1139 Limit the resulting set only to packages that require <capabil‐
1140 ity>. Use --whatdepends if you want to list all depending pack‐
1141 ages.
1142
1143 --whatsuggests <capability>
1144 Limit the resulting set only to packages that suggest <capabil‐
1145 ity>. Use --whatdepends if you want to list all depending pack‐
1146 ages.
1147
1148 --whatsupplements <capability>
1149 Limit the resulting set only to packages that supplement <capa‐
1150 bility>. Use --whatdepends if you want to list all depending
1151 packages.
1152
1153 --alldeps
1154 This option is stackable with --whatrequires or --whatdepends
1155 only. Additionally it adds all packages requiring the package
1156 features to the result set (used as default).
1157
1158 --exactdeps
1159 This option is stackable with --whatrequires or --whatdepends
1160 only. Limit the resulting set only to packages that require
1161 <capability> specified by --whatrequires.
1162
1163 --srpm Operate on the corresponding source RPM.
1164
1165 Query Options
1166 Set what information is displayed about each package.
1167
1168 The following are mutually exclusive, i.e. at most one can be speci‐
1169 fied. If no query option is given, matching packages are displayed in
1170 the standard NEVRA notation.
1171
1172 -i, --info
1173 Show detailed information about the package.
1174
1175 -l, --list
1176 Show the list of files in the package.
1177
1178 -s, --source
1179 Show the package source RPM name.
1180
1181 --changelogs
1182 Print the package changelogs.
1183
1184 --conflicts
1185 Display capabilities that the package conflicts with. Same as
1186 --qf "%{conflicts}.
1187
1188 --depends
1189 Display capabilities that the package depends on, enhances, rec‐
1190 ommends, suggests or supplements.
1191
1192 --enhances
1193 Display capabilities enhanced by the package. Same as --qf
1194 "%{enhances}"".
1195
1196 --location
1197 Show a location where the package could be downloaded from.
1198
1199 --obsoletes
1200 Display capabilities that the package obsoletes. Same as --qf
1201 "%{obsoletes}".
1202
1203 --provides
1204 Display capabilities provided by the package. Same as --qf
1205 "%{provides}".
1206
1207 --recommends
1208 Display capabilities recommended by the package. Same as --qf
1209 "%{recommends}".
1210
1211 --requires
1212 Display capabilities that the package depends on. Same as --qf
1213 "%{requires}".
1214
1215 --requires-pre
1216 Display capabilities that the package depends on for running a
1217 %pre script. Same as --qf "%{requires-pre}".
1218
1219 --suggests
1220 Display capabilities suggested by the package. Same as --qf
1221 "%{suggests}".
1222
1223 --supplements
1224 Display capabilities supplemented by the package. Same as --qf
1225 "%{supplements}".
1226
1227 --tree Display a recursive tree of packages with capabilities specified
1228 by one of the following supplementary options: --whatrequires,
1229 --requires, --conflicts, --enhances, --suggests, --provides,
1230 --supplements, --recommends.
1231
1232 --deplist
1233 Produce a list of all dependencies and what packages provide
1234 those dependencies for the given packages. The result only shows
1235 the newest providers (which can be changed by using --verbose).
1236
1237 --nvr Show found packages in the name-version-release format. Same as
1238 --qf "%{name}-%{version}-%{release}".
1239
1240 --nevra
1241 Show found packages in the name-epoch:version-release.architec‐
1242 ture format. Same as --qf "%{name}-%{epoch}:%{ver‐
1243 sion}-%{release}.%{arch}" (default).
1244
1245 --envra
1246 Show found packages in the epoch:name-version-release.architec‐
1247 ture format. Same as --qf "%{epoch}:%{name}-%{ver‐
1248 sion}-%{release}.%{arch}"
1249
1250 --qf <format>, --queryformat <format>
1251 Custom display format. <format> is the string to output for each
1252 matched package. Every occurrence of %{<tag>} within is replaced
1253 by the corresponding attribute of the package. The list of rec‐
1254 ognized tags can be displayed by running dnf repoquery --query‐
1255 tags.
1256
1257 --recursive
1258 Query packages recursively. Has to be used with --whatrequires
1259 <REQ> (optionaly with --alldeps, but not with --exactdeps) or
1260 with --requires <REQ> --resolve.
1261
1262 --resolve
1263 resolve capabilities to originating package(s).
1264
1265 Examples
1266 Display NEVRAs of all available packages matching light*:
1267
1268 dnf repoquery 'light*'
1269
1270 Display NEVRAs of all available packages matching name light* and
1271 architecture noarch (accepts only arguments in the "<name>.<arch>" for‐
1272 mat):
1273
1274 dnf repoquery-na 'light*.noarch'
1275
1276 Display requires of all ligttpd packages:
1277
1278 dnf repoquery --requires lighttpd
1279
1280 Display packages providing the requires of python packages:
1281
1282 dnf repoquery --requires python --resolve
1283
1284 Display source rpm of ligttpd package:
1285
1286 dnf repoquery --source lighttpd
1287
1288 Display package name that owns the given file:
1289
1290 dnf repoquery --file /etc/lighttpd/lighttpd.conf
1291
1292 Display name, architecture and the containing repository of all
1293 lighttpd packages:
1294
1295 dnf repoquery --queryformat '%{name}.%{arch} : %{reponame}' lighttpd
1296
1297 Display all available packages providing "webserver":
1298
1299 dnf repoquery --whatprovides webserver
1300
1301 Display all available packages providing "webserver" but only for
1302 "i686" architecture:
1303
1304 dnf repoquery --whatprovides webserver --arch i686
1305
1306 Display duplicate packages:
1307
1308 dnf repoquery --duplicates
1309
1310 Display source packages that require a <provide> for a build:
1311
1312 dnf repoquery --disablerepo=* --enablerepo=*-source --arch=src --whatrequires <provide>
1313
1314 Repo-Pkgs Command
1315 dnf [options] repo-pkgs
1316 Deprecated alias for the Repository-Packages Command.
1317
1318 Repository-Packages Command
1319 The repository-packages command allows the user to run commands on top
1320 of all packages in the repository named <repoid>. However, any depen‐
1321 dency resolution takes into account packages from all enabled reposito‐
1322 ries. The <package-name-spec> and <package-spec> specifications further
1323 limit the candidates to only those packages matching at least one of
1324 them.
1325
1326 The info subcommand lists description and summary information about
1327 packages depending on the packages' relation to the repository. The
1328 list subcommand just prints lists of those packages.
1329
1330 dnf [options] repository-packages <repoid> check-update [<pack‐
1331 age-name-spec>...]
1332 Non-interactively checks if updates of the specified packages in
1333 the repository are available. DNF exit code will be 100 when
1334 there are updates available and a list of the updates will be
1335 printed.
1336
1337 dnf [options] repository-packages <repoid> info [--all] [<pack‐
1338 age-name-spec>...]
1339 List all related packages.
1340
1341 dnf [options] repository-packages <repoid> info --installed [<pack‐
1342 age-name-spec>...]
1343 List packages installed from the repository.
1344
1345 dnf [options] repository-packages <repoid> info --available [<pack‐
1346 age-name-spec>...]
1347 List packages available in the repository but not currently
1348 installed on the system.
1349
1350 dnf [options] repository-packages <repoid> info --extras [<pack‐
1351 age-name-specs>...]
1352 List packages installed from the repository that are not avail‐
1353 able in any repository.
1354
1355 dnf [options] repository-packages <repoid> info --obsoletes [<pack‐
1356 age-name-spec>...]
1357 List packages in the repository that obsolete packages installed
1358 on the system.
1359
1360 dnf [options] repository-packages <repoid> info --recent [<pack‐
1361 age-name-spec>...]
1362 List packages recently added into the repository.
1363
1364 dnf [options] repository-packages <repoid> info --upgrades [<pack‐
1365 age-name-spec>...]
1366 List packages in the repository that upgrade packages installed
1367 on the system.
1368
1369 dnf [options] repository-packages <repoid> install [<package-spec>...]
1370 Install all packages in the repository.
1371
1372 dnf [options] repository-packages <repoid> list [--all] [<pack‐
1373 age-name-spec>...]
1374 List all related packages.
1375
1376 dnf [options] repository-packages <repoid> list --installed [<pack‐
1377 age-name-spec>...]
1378 List packages installed from the repository.
1379
1380 dnf [options] repository-packages <repoid> list --available [<pack‐
1381 age-name-spec>...]
1382 List packages available in the repository but not currently
1383 installed on the system.
1384
1385 dnf [options] repository-packages <repoid> list --extras [<pack‐
1386 age-name-specs>...]
1387 List packages installed from the repository that are not avail‐
1388 able in any repository.
1389
1390 dnf [options] repository-packages <repoid> list --obsoletes [<pack‐
1391 age-name-spec>...]
1392 List packages in the repository that obsolete packages installed
1393 on the system.
1394
1395 dnf [options] repository-packages <repoid> list --recent [<pack‐
1396 age-name-spec>...]
1397 List packages recently added into the repository.
1398
1399 dnf [options] repository-packages <repoid> list --upgrades [<pack‐
1400 age-name-spec>...]
1401 List packages in the repository that upgrade packages installed
1402 on the system.
1403
1404 dnf [options] repository-packages <repoid> move-to [<pack‐
1405 age-name-spec>...]
1406 Reinstall all those packages that are available in the reposi‐
1407 tory.
1408
1409 dnf [options] repository-packages <repoid> reinstall [<pack‐
1410 age-name-spec>...]
1411 Run the reinstall-old subcommand. If it fails, run the move-to
1412 subcommand.
1413
1414 dnf [options] repository-packages <repoid> reinstall-old [<pack‐
1415 age-name-spec>...]
1416 Reinstall all those packages that were installed from the repos‐
1417 itory and simultaneously are available in the repository.
1418
1419 dnf [options] repository-packages <repoid> remove [<pack‐
1420 age-name-spec>...]
1421 Remove all packages installed from the repository along with any
1422 packages depending on the packages being removed. If
1423 clean_requirements_on_remove is enabled (the default) also
1424 removes any dependencies that are no longer needed.
1425
1426 dnf [options] repository-packages <repoid> remove-or-distro-sync
1427 [<package-name-spec>...]
1428 Select all packages installed from the repository. Upgrade,
1429 downgrade or keep those of them that are available in another
1430 repository to match the latest version available there and
1431 remove the others along with any packages depending on the pack‐
1432 ages being removed. If clean_requirements_on_remove is enabled
1433 (the default) also removes any dependencies that are no longer
1434 needed.
1435
1436 dnf [options] repository-packages <repoid> remove-or-reinstall [<pack‐
1437 age-name-spec>...]
1438 Select all packages installed from the repository. Reinstall
1439 those of them that are available in another repository and
1440 remove the others along with any packages depending on the pack‐
1441 ages being removed. If clean_requirements_on_remove is enabled
1442 (the default) also removes any dependencies that are no longer
1443 needed.
1444
1445 dnf [options] repository-packages <repoid> upgrade [<pack‐
1446 age-name-spec>...]
1447 Update all packages to the highest resolvable version available
1448 in the repository.
1449
1450 dnf [options] repository-packages <repoid> upgrade-to <pack‐
1451 age-nevr-specs>...
1452 Update packages to the specified versions that are available in
1453 the repository. Upgrade-to is a deprecated alias for the upgrade
1454 subcommand.
1455
1456 Search Command
1457 dnf [options] search [--all] <keywords>...
1458 Search package metadata for keywords. Keywords are matched as
1459 case-insensitive substrings, globbing is supported. By default
1460 lists packages that match all requested keys (AND operation).
1461 Keys are searched in package names and summaries. If the
1462 "--all" option is used, lists packages that match at least one
1463 of the keys (an OR operation). In addition the keys are
1464 searched in the package descriptions and URLs. The result is
1465 sorted from the most relevant results to the least.
1466
1467 This command by default does not force a sync of expired metadata. See
1468 also Metadata Synchronization.
1469
1470 Shell Command
1471 dnf [options] shell [filename]
1472 Open an interactive shell for conducting multiple commands dur‐
1473 ing a single execution of DNF. These commands can be issued man‐
1474 ually or passed to DNF from a file. The commands are much the
1475 same as the normal DNF command line options. There are a few
1476 additional commands documented below.
1477
1478 config [conf-option] [value]
1479
1480 · Set a configuration option to a requested value. If no
1481 value is given it prints the current value.
1482
1483 repo [list|enable|disable] [repo-id]
1484
1485 · list: list repositories and their status
1486
1487 · enable: enable repository
1488
1489 · disable: disable repository
1490
1491 transaction [list|reset|solve|run]
1492
1493 · list: resolve and list the content of the transaction
1494
1495 · reset: reset the transaction
1496
1497 · run: resolve and run the transaction
1498
1499 Swap Command
1500 dnf [options] swap <remove-spec> <install-spec>
1501 Remove spec and install spec in one transaction. Each <spec> can be
1502 either a <package-spec>, which specifies a package directly, or a
1503 @<group-spec>, which specifies an (environment) group which contains
1504 it. Automatic conflict solving is provided in DNF by the --allow‐
1505 erasing option that provides the functionality of the swap command
1506 automatically.
1507
1508 Update Command
1509 dnf [options] update
1510 Deprecated alias for the Upgrade Command.
1511
1512 Updateinfo Command
1513 dnf [options] updateinfo [--summary|--list|--info] [<availability>]
1514 [<spec>...]
1515 Display information about update advisories.
1516
1517 Depending on the output type, DNF displays just counts of advi‐
1518 sory types (omitted or --summary), list of advisories (--list)
1519 or detailed information (--info). When the -v option is used
1520 with --info, the information is even more detailed.
1521
1522 <availability> specifies whether advisories about newer versions
1523 of installed packages (omitted or --available), advisories about
1524 equal and older versions of installed packages (--installed),
1525 advisories about newer versions of those installed packages for
1526 which a newer version is available (--updates) or advisories
1527 about any versions of installed packages (--all) are taken into
1528 account. Most of the time, --available and --updates displays
1529 the same output. The outputs differ only in the cases when an
1530 advisory refers to a newer version but there is no enabled
1531 repository which contains any newer version.
1532
1533 If given and if neither ID, type (bugfix, enhancement, secu‐
1534 rity/sec) nor a package name of an advisory matches <spec>, the
1535 advisory is not taken into account. The matching is case-sensi‐
1536 tive and in the case of advisory IDs and package names, globbing
1537 is supported.
1538
1539 Output of the --summary option is affected by the autocheck_run‐
1540 ning_kernel configuration option.
1541
1542 Update-Minimal Command
1543 dnf [options] update-minimal
1544 Deprecated alias for the Upgrade-Minimal Command.
1545
1546 Upgrade Command
1547 dnf [options] upgrade
1548 Updates each package to the latest version that is both avail‐
1549 able and resolvable.
1550
1551 dnf [options] upgrade <package-installed-specs>...
1552 Updates each specified package to the latest available version.
1553 Updates dependencies as necessary.
1554
1555 dnf [options] upgrade <package-nevr-specs>...
1556 Upgrades packages to the specified versions.
1557
1558 dnf [options] upgrade @<spec>...
1559 Alias for the dnf module update command.
1560
1561 If the main obsoletes configure option is true or the --obsoletes flag
1562 is present, dnf will include package obsoletes in its calculations.
1563 For more information see obsoletes.
1564
1565 See also Configuration Files Replacement Policy.
1566
1567 Upgrade-Minimal Command
1568 dnf [options] upgrade-minimal
1569 Updates each package to the latest available version that pro‐
1570 vides a bugfix, enhancement or a fix for a security issue (secu‐
1571 rity).
1572
1573 dnf [options] upgrade-minimal <package-installed-specs>...
1574 Updates each specified package to the latest available version
1575 that provides a bugfix, enhancement or a fix for security issue
1576 (security). Updates dependencies as necessary.
1577
1578 Update-To Command
1579 dnf [options] update-to <package-nevr-specs>...
1580 Deprecated alias for the Upgrade Command.
1581
1582 Upgrade-To Command
1583 dnf [options] upgrade-to <package-nevr-specs>...
1584 Deprecated alias for the Upgrade Command.
1585
1587 Many commands take a <package-spec> parameter that selects a package
1588 for the operation. DNF looks for interpretations of the parameter from
1589 the most commonly used meanings to the least, that is it tries to see
1590 if the given spec fits one of the following patterns (in decreasing
1591 order of priority):
1592
1593 · name.arch
1594
1595 · name
1596
1597 · name-[epoch:]version-release.arch
1598
1599 · name-[epoch:]version-release
1600
1601 · name-[epoch:]version
1602
1603 Note that name can in general contain dashes (e.g. package-subpackage).
1604
1605 Failing to match the input argument to an existing package name based
1606 on the patterns above, DNF tries to see if the argument matches an
1607 existing provide.
1608
1609 By default, if multiple versions of the selected package exist in the
1610 repository, the most recent version suitable for the given operation is
1611 used. If the selected package exists for multiple architectures, the
1612 packages which best match the system's architecture will be preferred.
1613 The name specification is case-sensitive, globbing characters "?, * and
1614 [ are allowed and trigger shell-like glob matching. If a globbing char‐
1615 acter is present in name, DNF expands given name first and consequently
1616 selects all packages matching the expanded <package-spec>.
1617
1618 <package-name-spec> is similar to <package-spec> except the provides
1619 matching is never attempted there.
1620
1621 <package-installed-specs> is similar to <package-specs> except it con‐
1622 siders only installed packages.
1623
1625 Commands accepting the <package-nevr-spec> parameter need not only the
1626 name of the package, but also its version, release and optionally the
1627 architecture. Further, the version part can be preceded by an epoch
1628 when it is relevant (i.e. the epoch is non-zero).
1629
1631 <provide-spec> in command descriptions means the command operates on
1632 packages providing the given spec. This can either be an explicit pro‐
1633 vide, an implicit provide (i.e. name of the package) or a file provide.
1634 The selection is case-sensitive and globbing is supported.
1635
1637 <group-spec> allows one to select (environment) groups a particular
1638 operation should work on. It is a case insensitive string (supporting
1639 globbing characters) that is matched against a group's ID, canonical
1640 name and name translated into the current LC_MESSAGES locale (if possi‐
1641 ble).
1642
1644 <module-spec> allows one to select modules or profiles a particular
1645 operation should work on.
1646
1647 It is in the form of NAME:STREAM:VERSION:CONTEXT:ARCH/PROFILE and sup‐
1648 ported partial forms are the following:
1649
1650 · NAME
1651
1652 · NAME:STREAM
1653
1654 · NAME:STREAM:VERSION
1655
1656 · NAME:STREAM:VERSION:CONTEXT
1657
1658 · all above combinations with ::ARCH (e.g. NAME::ARCH)
1659
1660 · NAME:STREAM:VERSION:CONTEXT:ARCH
1661
1662 · all above combinations with /PROFILE (e.g. NAME/PROFILE)
1663
1664 In case stream is not specified, the enabled or the default stream is
1665 used, in this order. In case profile is not specified, the system
1666 default profile or the 'default' profile is used.
1667
1669 <transaction-spec> can be in one of several forms. If it is an integer,
1670 it specifies a transaction ID. Specifying last is the same as specify‐
1671 ing the ID of the most recent transaction. The last form is last-<off‐
1672 set>, where <offset> is a positive integer. It specifies offset-th
1673 transaction preceding the most recent transaction.
1674
1676 Correct operation of DNF depends on having access to up-to-date data
1677 from all enabled repositories but contacting remote mirrors on every
1678 operation considerably slows it down and costs bandwidth for both the
1679 client and the repository provider. The metadata_expire (see
1680 dnf.conf(5)) repository configuration option is used by DNF to deter‐
1681 mine whether a particular local copy of repository data is due to be
1682 re-synced. It is crucial that the repository providers set the option
1683 well, namely to a value where it is guaranteed that if particular meta‐
1684 data was available in time T on the server, then all packages it refer‐
1685 ences will still be available for download from the server in time T +
1686 metadata_expire.
1687
1688 To further reduce the bandwidth load, some of the commands where having
1689 up-to-date metadata is not critical (e.g. the list command) do not look
1690 at whether a repository is expired and whenever any version of it is
1691 locally available to the user's account, it will be used. For non-root
1692 use, see also the --cacheonly switch. Note that in all situations the
1693 user can force synchronization of all enabled repositories with the
1694 --refresh switch.
1695
1697 The updated packages could replace the old modified configuration files
1698 with the new ones or keep the older files. Neither of the files are
1699 actually replaced. To the conflicting ones RPM gives additional suffix
1700 to the origin name. Which file should maintain the true name after
1701 transaction is not controlled by package manager but is specified by
1702 each package itself, following packaging guideline.
1703
1705 Cache Files
1706 /var/cache/dnf
1707
1708 Main Configuration
1709 /etc/dnf/dnf.conf
1710
1711 Repository
1712 /etc/yum.repos.d/
1713
1715 · dnf.conf(5), DNF Configuration Reference
1716
1717 · dnf.plugin.*(8), assorted DNF plugins that might be installed on the
1718 system.
1719
1720 · DNF project homepage (‐
1721 https://github.com/rpm-software-management/dnf/)
1722
1723 · How to report a bug (‐
1724 https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting)
1725
1726 · YUM project homepage (http://yum.baseurl.org/)
1727
1729 See AUTHORS in DNF source distribution.
1730
1732 2012-2014, Red Hat, Licensed under GPLv2+
1733
1734
1735
1736
17374.2.5 May 07, 2019 DNF(8)