Blame doc/command_ref.rst

Packit 6f3914
..
Packit 6f3914
  Copyright (C) 2014-2018 Red Hat, Inc.
Packit 6f3914
Packit 6f3914
  This copyrighted material is made available to anyone wishing to use,
Packit 6f3914
  modify, copy, or redistribute it subject to the terms and conditions of
Packit 6f3914
  the GNU General Public License v.2, or (at your option) any later version.
Packit 6f3914
  This program is distributed in the hope that it will be useful, but WITHOUT
Packit 6f3914
  ANY WARRANTY expressed or implied, including the implied warranties of
Packit 6f3914
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
Packit 6f3914
  Public License for more details.  You should have received a copy of the
Packit 6f3914
  GNU General Public License along with this program; if not, write to the
Packit 6f3914
  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit 6f3914
  02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
Packit 6f3914
  source code or documentation are not subject to the GNU General Public
Packit 6f3914
  License and may only be used or replicated with the express permission of
Packit 6f3914
  Red Hat, Inc.
Packit 6f3914
Packit 6f3914
.. _command_ref-label:
Packit 6f3914
Packit 6f3914
#######################
Packit 6f3914
 DNF Command Reference
Packit 6f3914
#######################
Packit 6f3914
Packit 6f3914
========
Packit 6f3914
Synopsis
Packit 6f3914
========
Packit 6f3914
Packit 6f3914
``dnf [options] <command> [<args>...]``
Packit 6f3914
Packit 6f3914
===========
Packit 6f3914
Description
Packit 6f3914
===========
Packit 6f3914
Packit 6f3914
.. _command_provides-label:
Packit 6f3914
Packit 6f3914
`DNF`_ is the next upcoming major version of `YUM`_, a package manager for RPM-based Linux
Packit 6f3914
distributions. It roughly maintains CLI compatibility with YUM and defines a strict API for
Packit 6f3914
extensions and plugins.
Packit 6f3914
Packit 6f3914
Plugins can modify or extend features of DNF or provide additional CLI commands on top of those
Packit 6f3914
mentioned below. If you know the name of such a command (including commands mentioned below), you
Packit 6f3914
may find/install the package which provides it using the appropriate virtual provide in the form of
Packit 6f3914
``dnf-command(<alias>)``, where ``<alias>`` is the name of the command; e.g.``dnf install
Packit 6f3914
'dnf-command(versionlock)'`` installs a ``versionlock`` plugin. This approach also applies to
Packit 6f3914
specifying dependencies of packages that require a particular DNF command.
Packit 6f3914
Packit 6f3914
Return values:
Packit 6f3914
Packit 6f3914
* ``0``  : Operation was successful.
Packit 6f3914
* ``1``  : An error occurred, which was handled by dnf.
Packit 6f3914
* ``3``  : An unknown unhandled error occurred during operation.
Packit 6f3914
* ``100``: See :ref:`check-update <check_update_command-label>`
Packit 6f3914
* ``200``: There was a problem with acquiring or releasing of locks.
Packit 6f3914
Packit 6f3914
Available commands:
Packit 6f3914
Packit 6f3914
* :ref:`alias <alias_command-label>`
Packit 6f3914
* :ref:`autoremove <autoremove_command-label>`
Packit 6f3914
* :ref:`check <check_command-label>`
Packit 6f3914
* :ref:`check-update <check_update_command-label>`
Packit 6f3914
* :ref:`clean <clean_command-label>`
Packit 6f3914
* :ref:`deplist <deplist_command-label>`
Packit 6f3914
* :ref:`distro-sync <distro_sync_command-label>`
Packit 6f3914
* :ref:`downgrade <downgrade_command-label>`
Packit 6f3914
* :ref:`group <group_command-label>`
Packit 6f3914
* :ref:`help <help_command-label>`
Packit 6f3914
* :ref:`history <history_command-label>`
Packit 6f3914
* :ref:`info <info_command-label>`
Packit 6f3914
* :ref:`install <install_command-label>`
Packit 6f3914
* :ref:`list <list_command-label>`
Packit 6f3914
* :ref:`makecache <makecache_command-label>`
Packit 6f3914
* :ref:`mark <mark_command-label>`
Packit 6f3914
* :ref:`module <module_command-label>`
Packit 6f3914
* :ref:`provides <provides_command-label>`
Packit 6f3914
* :ref:`reinstall <reinstall_command-label>`
Packit 6f3914
* :ref:`remove <remove_command-label>`
Packit 6f3914
* :ref:`repoinfo <repoinfo_command-label>`
Packit 6f3914
* :ref:`repolist <repolist_command-label>`
Packit 6f3914
* :ref:`repoquery <repoquery_command-label>`
Packit 6f3914
* :ref:`repository-packages <repository_packages_command-label>`
Packit 6f3914
* :ref:`search <search_command-label>`
Packit 6f3914
* :ref:`shell <shell_command-label>`
Packit 6f3914
* :ref:`swap <swap_command-label>`
Packit 6f3914
* :ref:`updateinfo <updateinfo_command-label>`
Packit 6f3914
* :ref:`upgrade <upgrade_command-label>`
Packit 6f3914
* :ref:`upgrade-minimal <upgrade_minimal_command-label>`
Packit 6f3914
* :ref:`upgrade-to <upgrade_to_command-label>`
Packit 6f3914
Packit 6f3914
Additional information:
Packit 6f3914
Packit 6f3914
* :ref:`Options <options-label>`
Packit 6f3914
* :ref:`Specifying Packages <specifying_packages-label>`
Packit 6f3914
* :ref:`Specifying Exact Versions of Packages <specifying_packages_versions-label>`
Packit 6f3914
* :ref:`Specifying Provides <specifying_provides-label>`
Packit 6f3914
* :ref:`Specifying Groups <specifying_groups-label>`
Packit 6f3914
* :ref:`Specifying Transactions <specifying_transactions-label>`
Packit 6f3914
* :ref:`Metadata Synchronization <metadata_synchronization-label>`
Packit 6f3914
* :ref:`Configuration Files Replacement Policy <configuration_files_replacement_policy-label>`
Packit 6f3914
* :ref:`Files <files-label>`
Packit 6f3914
* :ref:`See Also <see_also-label>`
Packit 6f3914
Packit 6f3914
.. _options-label:
Packit 6f3914
Packit 6f3914
=======
Packit 6f3914
Options
Packit 6f3914
=======
Packit 6f3914
Packit 6f3914
``-4``
Packit 6f3914
    Resolve to IPv4 addresses only.
Packit 6f3914
Packit 6f3914
``-6``
Packit 6f3914
    Resolve to IPv6 addresses only.
Packit 6f3914
Packit 6f3914
``--advisory=<advisory>, --advisories=<advisory>``
Packit 6f3914
    Include packages corresponding to the advisory ID, Eg. FEDORA-2201-123.
Packit 6f3914
    Applicable for the install, repoquery, updateinfo and upgrade commands.
Packit 6f3914
Packit 6f3914
``--allowerasing``
Packit 6f3914
    Allow erasing of installed packages to resolve dependencies. This option could be used as an alternative to the ``yum swap`` command where packages to remove are not explicitly defined.
Packit 6f3914
Packit 6f3914
``--assumeno``
Packit 6f3914
    Automatically answer no for all questions.
Packit 6f3914
Packit 6f3914
``-b, --best``
Packit 6f3914
    Try the best available package versions in transactions. Specifically during :ref:`dnf upgrade <upgrade_command-label>`, which by default skips over updates that can not be installed for dependency reasons, the switch forces DNF to only consider the latest packages. When running into packages with broken dependencies, DNF will fail giving a reason why the latest version can not be installed.
Packit 6f3914
Packit 6f3914
``--bugfix``
Packit 6f3914
    Include packages that fix a bugfix issue. Applicable for the install, repoquery, updateinfo and
Packit 6f3914
    upgrade commands.
Packit 6f3914
Packit 6f3914
``--bz=<bugzilla>, --bzs=<bugzilla>``
Packit 6f3914
    Include packages that fix a Bugzilla ID, Eg. 123123. Applicable for the install, repoquery,
Packit 6f3914
    updateinfo and upgrade commands.
Packit 6f3914
Packit 6f3914
``-C, --cacheonly``
Packit 6f3914
    Run entirely from system cache, don't update the cache and use it even in case it is expired.
Packit 6f3914
Packit 6f3914
    DNF uses a separate cache for each user under which it executes. The cache for the root user is called the system cache. This switch allows a regular user read-only access to the system cache, which usually is more fresh than the user's and thus he does not have to wait for metadata sync.
Packit 6f3914
Packit 6f3914
``--color=<color>``
Packit 6f3914
    Control whether color is used in terminal output. Valid values are ``always``, ``never`` and ``auto`` (default).
Packit 6f3914
Packit 6f3914
``--comment=<comment>``
Packit 6f3914
    Add a comment to the transaction history.
Packit 6f3914
Packit 6f3914
``-c <config file>, --config=<config file>``
Packit 6f3914
    Configuration file location.
Packit 6f3914
Packit 6f3914
``--cve=<cves>, --cves=<cves>``
Packit 6f3914
    Include packages that fix a CVE (Common Vulnerabilities and Exposures) ID
Packit 6f3914
    (http://cve.mitre.org/about/), Eg. CVE-2201-0123. Applicable for the install, repoquery, updateinfo,
Packit 6f3914
    and upgrade commands.
Packit 6f3914
Packit 6f3914
``-d <debug level>, --debuglevel=<debug level>``
Packit 6f3914
    Debugging output level. This is an integer value between 0 (no additional information strings) and 10 (shows all debugging information, even that not understandable to the user), default is 2. Deprecated, use ``-v`` instead.
Packit 6f3914
Packit 6f3914
``--debugsolver``
Packit 6f3914
    Dump data aiding in dependency solver debugging into ``./debugdata``.
Packit 6f3914
Packit 6f3914
.. _disableexcludes-label:
Packit 6f3914
Packit 6f3914
``--disableexcludes=[all|main|<repoid>], --disableexcludepkgs=[all|main|<repoid>]``
Packit 6f3914
Packit 6f3914
    Disable the configuration file excludes. Takes one of the following three options:
Packit 6f3914
Packit 6f3914
    * ``all``, disables all configuration file excludes
Packit 6f3914
    * ``main``, disables excludes defined in the ``[main]`` section
Packit 6f3914
    * ``repoid``, disables excludes defined for the given repository
Packit 6f3914
Packit 6f3914
``--disable, --set-disabled``
Packit 6f3914
    Disable specified repositories (automatically saves). The option has to be used together with the
Packit 6f3914
    ``config-manager`` command (dnf-plugins-core).
Packit 6f3914
Packit 6f3914
.. _disableplugin-label:
Packit 6f3914
Packit 6f3914
``--disableplugin=<plugin names>``
Packit 6f3914
    Disable the listed plugins specified by names or globs.
Packit 6f3914
Packit 6f3914
``--disablerepo=<repoid>``
Packit 6f3914
    Disable specific repositories by an id or a glob. This option is mutually exclusive with ``--repo``.
Packit 6f3914
Packit 6f3914
``--downloaddir=<path>, --destdir=<path>``
Packit 6f3914
    Redirect downloaded packages to provided directory. The option has to be used together with the \-\
Packit 6f3914
    :ref:`-downloadonly <downloadonly-label>` command line option, with the
Packit 6f3914
    ``download`` command (dnf-plugins-core) or with the ``system-upgrade`` command
Packit 6f3914
    (dnf-plugins-extras).
Packit 6f3914
Packit 6f3914
.. _downloadonly-label:
Packit 6f3914
Packit 6f3914
``--downloadonly``
Packit 6f3914
    Download the resolved package set without performing any rpm transaction (install/upgrade/erase).
Packit 6f3914
Packit 6f3914
``-e <error level>, --errorlevel=<error level>``
Packit 6f3914
    Error output level. This is an integer value between 0 (no error output) and
Packit 6f3914
    10 (shows all error messages), default is 3. Deprecated, use ``-v`` instead.
Packit 6f3914
Packit 6f3914
``--enable, --set-enabled``
Packit 6f3914
    Enable specified repositories (automatically saves). The option has to be used together with the
Packit 6f3914
    ``config-manager`` command (dnf-plugins-core).
Packit 6f3914
Packit 6f3914
``--enableplugin=<plugin names>``
Packit 6f3914
    Enable the listed plugins specified by names or globs.
Packit 6f3914
Packit 6f3914
``--enablerepo=<repoid>``
Packit 6f3914
    Enable additional repositories by an id or a glob.
Packit 6f3914
Packit 6f3914
``--enhancement``
Packit 6f3914
    Include enhancement relevant packages. Applicable for the install, repoquery, updateinfo and
Packit 6f3914
    upgrade commands.
Packit 6f3914
Packit 6f3914
.. _exclude_option-label:
Packit 6f3914
Packit 6f3914
``-x <package-file-spec>, --exclude=<package-file-spec>``
Packit 6f3914
    Exclude packages specified by ``<package-file-spec>`` from the operation.
Packit 6f3914
Packit 6f3914
``--excludepkgs=<package-file-spec>``
Packit 6f3914
    Deprecated option. It was replaced by the \-\ :ref:`-exclude <exclude_option-label>` option.
Packit 6f3914
Packit 6f3914
``--forcearch=<arch>``
Packit 6f3914
    Force the use of an architecture. Any architecture can be specified.
Packit 6f3914
    However, use of an architecture not supported natively by your CPU will
Packit 6f3914
    require emulation of some kind. This is usually through QEMU. The behavior of ``--forcearch``
Packit 6f3914
    can be configured by using the :ref:`arch <arch-label>` and :ref:`ignorearch <ignorearch-label>`
Packit 6f3914
    configuration options with values ``<arch>`` and ``True`` respectively.
Packit 6f3914
Packit 6f3914
``-h, --help, --help-cmd``
Packit 6f3914
    Show the help.
Packit 6f3914
Packit 6f3914
.. _installroot-label:
Packit 6f3914
Packit 6f3914
``--installroot=<path>``
Packit 6f3914
    Specifies an alternative installroot, relative to where all packages will be
Packit 6f3914
    installed. Think of this like doing ``chroot <root> dnf``, except using
Packit 6f3914
    ``--installroot`` allows dnf to work before the chroot is created. It requires absolute path.
Packit 6f3914
Packit 6f3914
- *cachedir*, *log files*, *releasever*, and *gpgkey* are taken from or
Packit 6f3914
  stored in the installroot. *Gpgkeys* are imported into the installroot from
Packit 6f3914
  a path relative to the host which can be specified in the repository section
Packit 6f3914
  of configuration files.
Packit 6f3914
Packit 6f3914
- *configuration file* and :ref:`reposdir <reposdir-label>` are searched inside the installroot first. If
Packit 6f3914
  they are not present, they are taken from the host system.
Packit 6f3914
  Note:  When a path is specified within a command line argument
Packit 6f3914
  (``--config=<config file>`` in case of *configuration file* and
Packit 6f3914
  ``--setopt=reposdir=<reposdir>`` for *reposdir*) then this path is always
Packit 6f3914
  relative to the host with no exceptions.
Packit 6f3914
Packit 6f3914
- *vars* are taken from the host system or installroot according to :ref:`reposdir <reposdir-label>`
Packit 6f3914
  . When *reposdir* path is specified within a command line argument, vars are taken from the
Packit 6f3914
  installroot. When :ref:`varsdir <varsdir_options-label>` paths are specified within a command line
Packit 6f3914
  argument (``--setopt=varsdir=<reposdir>``) then those path are always relative to the host with no
Packit 6f3914
  exceptions.
Packit 6f3914
Packit 6f3914
- The *pluginpath* and *pluginconfpath* are relative to the host.
Packit 6f3914
Packit 6f3914
 Note: You may also want to use the command-line option
Packit 6f3914
 ``--releasever=<release>`` when creating the installroot, otherwise the
Packit 6f3914
 *$releasever* value is taken from the rpmdb within the installroot (and thus
Packit 6f3914
 it is empty at the time of creation and the transaction will fail). If ``--releasever=/`` is used, the
Packit 6f3914
 releasever will be detected from the host (``/``) system. The new installroot path at the time of creation
Packit 6f3914
 does not contain the *repository*, *releasever* and *dnf.conf* files.
Packit 6f3914
Packit 6f3914
 On a modular system you may also want to use the
Packit 6f3914
 ``--setopt=module_platform_id=<module_platform_name:stream>`` command-line option when creating the installroot,
Packit 6f3914
 otherwise the :ref:`module_platform_id <module_platform_id-label>` value will be taken from the
Packit 6f3914
 ``/etc/os-release`` file within the installroot (and thus it will be empty at the time of creation, the modular
Packit 6f3914
 dependency could be unsatisfied and modules content could be excluded).
Packit 6f3914
Packit 6f3914
 Installroot examples:
Packit 6f3914
Packit 6f3914
 ``dnf --installroot=<installroot> --releasever=<release> install system-release``
Packit 6f3914
     Permanently sets the ``releasever`` of the system in the
Packit 6f3914
     ``<installroot>`` directory to ``<release>``.
Packit 6f3914
Packit 6f3914
 ``dnf --installroot=<installroot> --setopt=reposdir=<path> --config /path/dnf.conf upgrade``
Packit 6f3914
     Upgrades packages inside the installroot from a repository described by
Packit 6f3914
     ``--setopt`` using configuration from ``/path/dnf.conf``.
Packit 6f3914
Packit 6f3914
``--newpackage``
Packit 6f3914
    Include newpackage relevant packages. Applicable for the install, repoquery, updateinfo and
Packit 6f3914
    upgrade commands.
Packit 6f3914
Packit 6f3914
``--noautoremove``
Packit 6f3914
    Disable removal of dependencies that are no longer used. It sets
Packit 6f3914
    :ref:`clean_requirements_on_remove <clean_requirements_on_remove-label>` configuration option to ``False``.
Packit 6f3914
Packit 6f3914
``--nobest``
Packit 6f3914
    Set best option to ``False``, so that transactions are not limited to best candidates only.
Packit 6f3914
Packit 6f3914
``--nodocs``
Packit 6f3914
    Do not install documentation. Sets the rpm flag 'RPMTRANS_FLAG_NODOCS'.
Packit 6f3914
Packit 6f3914
``--nogpgcheck``
Packit 6f3914
    Skip checking GPG signatures on packages (if RPM policy allows).
Packit 6f3914
Packit 6f3914
``--noplugins``
Packit 6f3914
    Disable all plugins.
Packit 6f3914
Packit 6f3914
.. _obsoletes_option-label:
Packit 6f3914
Packit 6f3914
``--obsoletes``
Packit 6f3914
    This option has an effect on an install/update, it enables
Packit 6f3914
    dnf's obsoletes processing logic. For more information see the
Packit 6f3914
    :ref:`obsoletes <obsoletes_conf_option-label>` option.
Packit 6f3914
Packit 6f3914
    This option also displays capabilities that the package obsoletes when used together with the :ref:`repoquery <repoquery_command-label>` command.
Packit 6f3914
Packit 6f3914
    Configuration Option: :ref:`obsoletes <obsoletes_conf_option-label>`
Packit 6f3914
Packit 6f3914
``-q, --quiet``
Packit 6f3914
    In combination with a non-interactive command, shows just the relevant content. Suppresses messages notifying about the current state or actions of DNF.
Packit 6f3914
Packit 6f3914
``-R <minutes>, --randomwait=<minutes>``
Packit 6f3914
    Maximum command wait time.
Packit 6f3914
Packit 6f3914
.. _refresh_command-label:
Packit 6f3914
Packit 6f3914
``--refresh``
Packit 6f3914
    Set metadata as expired before running the command.
Packit 6f3914
Packit 6f3914
``--releasever=<release>``
Packit 6f3914
    Configure DNF as if the distribution release was ``<release>``. This can
Packit 6f3914
    affect cache paths, values in configuration files and mirrorlist URLs.
Packit 6f3914
Packit 6f3914
.. _repofrompath_options-label:
Packit 6f3914
Packit 6f3914
Packit 6f3914
``--repofrompath <repo>,<path/url>``
Packit 6f3914
    Specify a repository to add to the repositories for this query.
Packit 6f3914
    This option can be used multiple times.
Packit 6f3914
Packit 6f3914
- The repository label is specified by ``<repo>``.
Packit 6f3914
- The path or url to the repository is specified by ``<path/url>``.
Packit 6f3914
  It is the same path as a baseurl and can be also enriched by the
Packit 6f3914
  :ref:`repo variables <repo-variables-label>`.
Packit 6f3914
- The configuration for the repository can be adjusted using \-\
Packit 6f3914
  :ref:`-setopt <setopt_option-label>`\=<repo>.<option>=<value>\.
Packit 6f3914
- If you want to view only packages from this repository, combine this
Packit 6f3914
  with the ``--repo=<repo>`` or ``--disablerepo="*"`` switches.
Packit 6f3914
Packit 6f3914
``--repo=<repoid>, --repoid=<repoid>``
Packit 6f3914
    Enable just specific repositories by an id or a glob. Can be used multiple
Packit 6f3914
    times with accumulative effect. It is basically a shortcut for
Packit 6f3914
    ``--disablerepo="*" --enablerepo=<repoid>`` and is mutually exclusive with
Packit 6f3914
    the ``--disablerepo`` option.
Packit 6f3914
Packit 6f3914
``--rpmverbosity=<name>``
Packit 6f3914
    RPM debug scriptlet output level. Sets the debug level to ``<name>`` for RPM scriptlets.
Packit 6f3914
    For available levels, see the ``rpmverbosity`` configuration option.
Packit 6f3914
Packit 6f3914
``--sec-severity=<severity>, --secseverity=<severity>``
Packit 6f3914
    Includes packages that provide a fix for an issue of the specified severity.
Packit 6f3914
    Applicable for the install, repoquery, updateinfo and upgrade commands.
Packit 6f3914
Packit 6f3914
``--security``
Packit 6f3914
    Includes packages that provide a fix for a security issue. Applicable for the
Packit 6f3914
    upgrade command.
Packit 6f3914
Packit 6f3914
.. _setopt_option-label:
Packit 6f3914
Packit 6f3914
``--setopt=<option>=<value>``
Packit 6f3914
    Override a configuration option from the configuration file. To override configuration options for repositories, use
Packit 6f3914
    ``repoid.option`` for the ``<option>``. Values for configuration options like ``excludepkgs``, ``includepkgs``,
Packit 6f3914
    ``installonlypkgs`` and ``tsflags`` are appended to the original value, they do not override it. However, specifying
Packit 6f3914
    an empty value (e.g. ``--setopt=tsflags=``) will clear the option.
Packit 6f3914
Packit 6f3914
.. _skip-broken_option-label:
Packit 6f3914
Packit 6f3914
``--skip-broken``
Packit 6f3914
    Resolve depsolve problems by removing packages that are causing problems from the transaction.
Packit 6f3914
    It is an alias for the :ref:`strict <strict-label>` configuration option with value ``False``.
Packit 6f3914
    Additionally, with the :ref:`enable <module_enable_command-label>` and
Packit 6f3914
    :ref:`disable <module_disable_command-label>` module subcommands it allows one to perform an action even in case of
Packit 6f3914
    broken modular dependencies.
Packit 6f3914
Packit 6f3914
``--showduplicates``
Packit 6f3914
    Show duplicate packages in repositories. Applicable for the list and search commands.
Packit 6f3914
Packit 6f3914
.. _verbose_options-label:
Packit 6f3914
Packit 6f3914
``-v, --verbose``
Packit 6f3914
    Verbose operation, show debug messages.
Packit 6f3914
Packit 6f3914
``--version``
Packit 6f3914
    Show DNF version and exit.
Packit 6f3914
Packit 6f3914
``-y, --assumeyes``
Packit 6f3914
    Automatically answer yes for all questions.
Packit 6f3914
Packit 6f3914
List options are comma-separated. Command-line options override respective settings from configuration files.
Packit 6f3914
Packit 6f3914
========
Packit 6f3914
Commands
Packit 6f3914
========
Packit 6f3914
Packit 6f3914
For an explanation of ``<package-spec>`` and ``<package-file-spec>`` see
Packit 6f3914
:ref:`\specifying_packages-label`.
Packit 6f3914
Packit 6f3914
For an explanation of ``<package-nevr-spec>`` see
Packit 6f3914
:ref:`\specifying_packages_versions-label`.
Packit 6f3914
Packit 6f3914
For an explanation of ``<provide-spec>`` see :ref:`\specifying_provides-label`.
Packit 6f3914
Packit 6f3914
For an explanation of ``<group-spec>`` see :ref:`\specifying_groups-label`.
Packit 6f3914
Packit 6f3914
For an explanation of ``<module-spec>`` see :ref:`\specifying_modules-label`.
Packit 6f3914
Packit 6f3914
For an explanation of ``<transaction-spec>`` see :ref:`\specifying_transactions-label`.
Packit 6f3914
Packit 6f3914
.. _alias_command-label:
Packit 6f3914
Packit 6f3914
-------------
Packit 6f3914
Alias Command
Packit 6f3914
-------------
Packit 6f3914
Allows the user to define and manage a list of aliases (in the form ``<name=value>``),
Packit 6f3914
which can be then used as dnf commands to abbreviate longer command sequences. For examples on using
Packit 6f3914
the alias command, see :ref:`\Alias Examples\ <alias_examples-label>`. For examples on the alias
Packit 6f3914
processing, see :ref:`\Alias Processing Examples\ <alias_processing_examples-label>`.
Packit 6f3914
Packit 6f3914
To use an alias (name=value), the name must be placed as the first "command" (e.g. the first argument
Packit 6f3914
that is not an option). It is then replaced by its value and the resulting sequence is again searched
Packit 6f3914
for aliases. The alias processing stops when the first found command is not a name of any alias.
Packit 6f3914
Packit 6f3914
Also, like in shell aliases, if the result starts with a ``\``, the alias processing will stop.
Packit 6f3914
Packit 6f3914
All aliases are defined in configuration files in the ``/etc/dnf/aliases.d/`` directory in the [aliases] section,
Packit 312934
and aliases created by the alias command are written to the ``USER.conf`` file. In case of conflicts,
Packit 312934
the ``USER.conf`` has the highest priority, and alphabetical ordering is used for the rest of the
Packit 312934
configuration files.
Packit 312934
Packit 6f3914
Optionally, there is the ``enabled`` option in the ``[main]`` section defaulting to True. This can be set for each
Packit 6f3914
file separately in the respective file, or globally for all aliases in the ``ALIASES.conf`` file.
Packit 6f3914
Packit 6f3914
``dnf alias [options] [list] [<name>...]``
Packit 6f3914
Packit 6f3914
    List aliases with their final result. The ``[<alias>...]`` parameter further limits the result to only those aliases matching it.
Packit 6f3914
Packit 6f3914
``dnf alias [options] add <name=value>...``
Packit 6f3914
Packit 6f3914
    Create new aliases.
Packit 6f3914
Packit 6f3914
``dnf alias [options] delete <name>...``
Packit 6f3914
Packit 6f3914
    Delete aliases.
Packit 6f3914
Packit 6f3914
.. _alias_examples-label:
Packit 6f3914
Packit 6f3914
Alias Examples
Packit 6f3914
--------------
Packit 6f3914
Packit 6f3914
``dnf alias list``
Packit 6f3914
    Lists all defined aliases.
Packit 6f3914
Packit 6f3914
``dnf alias add rm=remove``
Packit 6f3914
    Adds new alias command called "rm" which does the same thing as the command "remove".
Packit 6f3914
Packit 6f3914
``dnf alias add update="\update --skip-broken --disableexcludes=all --obsoletes"``
Packit 6f3914
    Adds new alias command called "update" which does the same thing as the command "update", but with options ``--skip-broken --disableexcludes=all --obsoletes``.
Packit 6f3914
Packit 6f3914
.. _alias_processing_examples-label:
Packit 6f3914
Packit 6f3914
Alias Processing Examples
Packit 6f3914
-------------------------
Packit 6f3914
Packit 6f3914
If there are defined aliases ``in=install`` and ``FORCE="--skip-broken --disableexcludes=all"``:
Packit 6f3914
Packit 6f3914
* ``dnf FORCE in`` will be replaced with ``dnf --skip-broken --disableexcludes=all install``
Packit 6f3914
* ``dnf in FORCE`` will be replaced with ``dnf install FORCE`` (which will fail)
Packit 6f3914
Packit 6f3914
If there is defined alias ``in=install``:
Packit 6f3914
Packit 6f3914
* ``dnf in`` will be replaced with ``dnf install``
Packit 6f3914
* ``dnf --repo updates in`` will be replaced with ``dnf --repo updates in`` (which will fail)
Packit 6f3914
Packit 6f3914
.. _autoremove_command-label:
Packit 6f3914
Packit 6f3914
-------------------
Packit 6f3914
Auto Remove Command
Packit 6f3914
-------------------
Packit 6f3914
Packit 6f3914
``dnf [options] autoremove``
Packit 6f3914
Packit 6f3914
    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.
Packit 6f3914
Packit 6f3914
Packages listed in :ref:`installonlypkgs <installonlypkgs-label>` are never automatically removed by
Packit 6f3914
this command.
Packit 6f3914
Packit 6f3914
``dnf [options] autoremove <spec>...``
Packit 6f3914
Packit 6f3914
    This is an alias for the :ref:`\remove_command-label` command with clean_requirements_on_remove set to
Packit 6f3914
    ``True``. It removes the specified packages from the system along with any packages depending on the
Packit 6f3914
    packages being removed. Each ``<spec>`` can be either a ``<package-spec>``, which specifies a
Packit 6f3914
    package directly, or a ``@<group-spec>``, which specifies an (environment) group which contains
Packit 6f3914
    it. It also removes any dependencies that are no longer needed.
Packit 6f3914
Packit 6f3914
    There are also a few specific autoremove commands ``autoremove-n``, ``autoremove-na`` and
Packit 6f3914
    ``autoremove-nevra`` that allow the specification of an exact argument in the NEVRA
Packit 6f3914
    (name-epoch:version-release.architecture) format.
Packit 6f3914
Packit 6f3914
This command by default does not force a sync of expired metadata. See also :ref:`\metadata_synchronization-label`.
Packit 6f3914
Packit 6f3914
.. _check_command-label:
Packit 6f3914
Packit 6f3914
--------------------
Packit 6f3914
Check Command
Packit 6f3914
--------------------
Packit 6f3914
Packit 6f3914
``dnf [options] check [--dependencies] [--duplicates] [--obsoleted] [--provides]``
Packit 6f3914
Packit 6f3914
    Checks the local packagedb and produces information on any problems it
Packit 6f3914
    finds. You can limit the checks to be performed by using the ``--dependencies``,
Packit 6f3914
    ``--duplicates``, ``--obsoleted`` and ``--provides`` options (the default is to
Packit 6f3914
    check everything).
Packit 6f3914
Packit 6f3914
.. _check_update_command-label:
Packit 6f3914
Packit 6f3914
--------------------
Packit 6f3914
Check-Update Command
Packit 6f3914
--------------------
Packit 6f3914
Packit 6f3914
``dnf [options] check-update [--changelogs] [<package-file-spec>...]``
Packit 6f3914
Packit 6f3914
    Non-interactively checks if updates of the specified packages are available. If no ``<package-file-spec>`` is 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. If ``--changelogs`` option is specified, also changelog delta of packages about to be updated is printed.
Packit 6f3914
Packit 6f3914
    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`` has restrictions (like package dependencies being satisfied) to take into account.
Packit 6f3914
Packit 6f3914
    The output is affected by the :ref:`autocheck_running_kernel <autocheck_running_kernel-label>` configuration option.
Packit 6f3914
Packit 6f3914
.. _clean_command-label:
Packit 6f3914
Packit 6f3914
-------------
Packit 6f3914
Clean Command
Packit 6f3914
-------------
Packit 6f3914
Performs cleanup of temporary files kept for repositories. This includes any
Packit 6f3914
such data left behind from disabled or removed repositories as well as for
Packit 6f3914
different distribution release versions.
Packit 6f3914
Packit 6f3914
``dnf clean dbcache``
Packit 6f3914
    Removes cache files generated from the repository metadata. This forces DNF
Packit 6f3914
    to regenerate the cache files the next time it is run.
Packit 6f3914
Packit 6f3914
``dnf clean expire-cache``
Packit 6f3914
    Marks the repository metadata expired. DNF will re-validate the cache for
Packit 6f3914
    each repository the next time it is used.
Packit 6f3914
Packit 6f3914
``dnf clean metadata``
Packit 6f3914
    Removes repository metadata. Those are the files which DNF uses to determine
Packit 6f3914
    the remote availability of packages. Using this option will make DNF
Packit 6f3914
    download all the metadata the next time it is run.
Packit 6f3914
Packit 6f3914
``dnf clean packages``
Packit 6f3914
    Removes any cached packages from the system.
Packit 6f3914
Packit 6f3914
``dnf clean all``
Packit 6f3914
    Does all of the above.
Packit 6f3914
Packit 6f3914
.. _deplist_command-label:
Packit 6f3914
Packit 6f3914
---------------
Packit 6f3914
Deplist command
Packit 6f3914
---------------
Packit 6f3914
Packit 6f3914
``dnf [options] deplist [<select-options>] [<query-options>] [<package-spec>]``
Packit 6f3914
    Alias for :ref:`dnf repoquery --deplist <deplist_option-label>`.
Packit 6f3914
Packit 6f3914
.. _distro_sync_command-label:
Packit 6f3914
Packit 6f3914
-------------------
Packit 6f3914
Distro-Sync command
Packit 6f3914
-------------------
Packit 6f3914
Packit 6f3914
``dnf distro-sync [<package-spec>...]``
Packit 6f3914
    As necessary upgrades, downgrades or keeps selected installed packages to match
Packit 6f3914
    the latest version available from any enabled repository. If no package is given, all installed packages are considered.
Packit 6f3914
Packit 6f3914
    See also :ref:`\configuration_files_replacement_policy-label`.
Packit 6f3914
Packit 6f3914
------------------------------------
Packit 6f3914
Distribution-Synchronization command
Packit 6f3914
------------------------------------
Packit 6f3914
Packit 6f3914
``dnf distribution-synchronization``
Packit 6f3914
    Deprecated alias for the :ref:`\distro_sync_command-label`.
Packit 6f3914
Packit 6f3914
.. _downgrade_command-label:
Packit 6f3914
Packit 6f3914
-----------------
Packit 6f3914
Downgrade Command
Packit 6f3914
-----------------
Packit 6f3914
Packit 6f3914
``dnf [options] downgrade <package-spec>...``
Packit 6f3914
    Downgrades the specified packages to the highest installable package of all known lower versions
Packit 6f3914
    if possible. When version is given and is lower than version of installed package then it
Packit 6f3914
    downgrades to target version.
Packit 6f3914
Packit 6f3914
.. _erase_command-label:
Packit 6f3914
Packit 6f3914
-------------
Packit 6f3914
Erase Command
Packit 6f3914
-------------
Packit 6f3914
Packit 6f3914
``dnf [options] erase <spec>...``
Packit 6f3914
    Deprecated alias for the :ref:`\remove_command-label`.
Packit 6f3914
Packit 6f3914
.. _group_command-label:
Packit 6f3914
Packit 6f3914
-------------
Packit 6f3914
Group Command
Packit 6f3914
-------------
Packit 6f3914
Packit 6f3914
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.
Packit 6f3914
Packit 6f3914
``dnf [options] group [summary] <group-spec>``
Packit 6f3914
    Display overview of how many groups are installed and available. With a
Packit 6f3914
    spec, limit the output to the matching groups. ``summary`` is the default
Packit 6f3914
    groups subcommand.
Packit 6f3914
Packit 6f3914
``dnf [options] group info <group-spec>``
Packit 6f3914
    Display package lists of a group. Shows which packages are installed or
Packit 6f3914
    available from a repository when ``-v`` is used.
Packit 6f3914
Packit 6f3914
``dnf [options] group install [--with-optional] <group-spec>...``
Packit 6f3914
    Mark the specified group installed and install packages it contains. Also
Packit 6f3914
    include `optional` packages of the group if ``--with-optional`` is
Packit 6f3914
    specified. All `mandatory` and `Default` packages will be installed whenever possible.
Packit 6f3914
    Conditional packages are installed if they meet their requirement.
Packit 6f3914
    If the group is already (partially) installed, the command installs the missing packages from the group.
Packit 6f3914
    Depending on the value of :ref:`obsoletes configuration option <obsoletes_conf_option-label>` group installation takes obsoletes into account.
Packit 6f3914
Packit 6f3914
.. _grouplist_command-label:
Packit 6f3914
Packit 6f3914
``dnf [options] group list <group-spec>...``
Packit 6f3914
    List all matching groups, either among installed or available groups. If
Packit 6f3914
    nothing is specified, list all known groups. ``--installed`` and ``--available`` options narrow down the requested list.
Packit 6f3914
    Records are ordered by the `display_order` tag defined in comps.xml file.
Packit 6f3914
    Provides a list of all hidden groups by using option ``--hidden``.
Packit 6f3914
    Provides group IDs when the ``-v`` or ``--ids`` options are used.
Packit 6f3914
Packit 6f3914
``dnf [options] group remove <group-spec>...``
Packit 6f3914
    Mark the group removed and remove those packages in the group from the system which do not belong to another installed group and were not installed explicitly by the user.
Packit 6f3914
Packit 6f3914
``dnf [options] group upgrade <group-spec>...``
Packit 6f3914
    Upgrades the packages from the group and upgrades the group itself. The latter comprises of installing packages 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.
Packit 6f3914
Packit 6f3914
Groups can also be marked installed or removed without physically manipulating any packages:
Packit 6f3914
Packit 6f3914
``dnf [options] group mark install <group-spec>...``
Packit 6f3914
    Mark the specified group installed. No packages will be installed by this command, but the group is then considered installed.
Packit 6f3914
Packit 6f3914
``dnf [options] group mark remove <group-spec>...``
Packit 6f3914
    Mark the specified group removed. No packages will be removed by this command.
Packit 6f3914
Packit 6f3914
See also :ref:`\configuration_files_replacement_policy-label`.
Packit 6f3914
Packit 6f3914
.. _groups_command-label:
Packit 6f3914
Packit 6f3914
--------------
Packit 6f3914
Groups Command
Packit 6f3914
--------------
Packit 6f3914
Packit 6f3914
``dnf [options] groups``
Packit 6f3914
    Deprecated alias for the :ref:`\group_command-label`.
Packit 6f3914
Packit 6f3914
.. _help_command-label:
Packit 6f3914
Packit 6f3914
------------
Packit 6f3914
Help Command
Packit 6f3914
------------
Packit 6f3914
Packit 6f3914
``dnf help [<command>]``
Packit 6f3914
    Displays the help text for all commands. If given a command name then only
Packit 6f3914
    displays help for that particular command.
Packit 6f3914
Packit 6f3914
.. _history_command-label:
Packit 6f3914
Packit 6f3914
---------------
Packit 6f3914
History Command
Packit 6f3914
---------------
Packit 6f3914
Packit 6f3914
The history command allows the user to view what has happened in past
Packit 6f3914
transactions and act according to this information (assuming the
Packit 6f3914
``history_record`` configuration option is set).
Packit 6f3914
Packit 6f3914
.. _history_list_command-label:
Packit 6f3914
Packit 6f3914
``dnf history [list] [<spec>...]``
Packit 6f3914
    The default history action is listing information about given transactions
Packit 6f3914
    in a table. Each ``<spec>`` can be either a ``<transaction-spec>``, which
Packit 6f3914
    specifies a transaction directly, or a ``<transaction-spec>..<transaction-spec>``,
Packit 6f3914
    which specifies a range of transactions, or a ``<package-name-spec>``,
Packit 6f3914
    which specifies a transaction by a package which it manipulated. When no
Packit 6f3914
    transaction is specified, list all known transactions.
Packit 6f3914
Packit 6f3914
``dnf history info [<spec>...]``
Packit 6f3914
    Describe the given transactions. The meaning of ``<spec>`` is the same as
Packit 6f3914
    in the :ref:`History List Command <history_list_command-label>`. When no
Packit 6f3914
    transaction is specified, describe what happened during the latest
Packit 6f3914
    transaction.
Packit 6f3914
Packit 6f3914
.. _history_redo_command-label:
Packit 6f3914
Packit 6f3914
``dnf history redo <transaction-spec>|<package-file-spec>``
Packit 6f3914
    Repeat the specified transaction. Uses the last transaction (with the highest ID)
Packit 6f3914
    if more than one transaction for given <package-file-spec> is found. If it is not possible
Packit 6f3914
    to redo some operations due to the current state of RPMDB, it will not redo the transaction.
Packit 6f3914
Packit 6f3914
``dnf history rollback <transaction-spec>|<package-file-spec>``
Packit 6f3914
    Undo all transactions performed after the specified transaction. Uses the last transaction
Packit 6f3914
    (with the highest ID) if more than one transaction for given <package-file-spec> is found.
Packit 6f3914
    If it is not possible to undo some transactions due to the current state of RPMDB, it will not undo
Packit 6f3914
    any transaction.
Packit 6f3914
Packit 6f3914
``dnf history undo <transaction-spec>|<package-file-spec>``
Packit 6f3914
    Perform the opposite operation to all operations performed in the specified transaction.
Packit 6f3914
    Uses the last transaction (with the highest ID) if more than one transaction for given
Packit 6f3914
    <package-file-spec> is found. If it is not possible to undo some operations due to
Packit 6f3914
    the current state of RPMDB, it will not undo the transaction.
Packit 6f3914
Packit 6f3914
``dnf history userinstalled``
Packit 6f3914
    Show all installonly packages, packages installed outside of DNF and packages not
Packit 6f3914
    installed as dependency. I.e. it lists packages that will stay on the system when
Packit 6f3914
    :ref:`\autoremove_command-label` or :ref:`\remove_command-label` along with
Packit 6f3914
    `clean_requirements_on_remove` configuration option set to True is executed. Note the same
Packit 6f3914
    results can be accomplished with ``dnf repoquery --userinstalled``, and the repoquery
Packit 6f3914
    command is more powerful in formatting of the output.
Packit 6f3914
Packit 6f3914
This command by default does not force a sync of expired metadata, except for
Packit 6f3914
the redo, rollback, and undo subcommands.
Packit 6f3914
See also :ref:`\metadata_synchronization-label`
Packit 6f3914
and :ref:`\configuration_files_replacement_policy-label`.
Packit 6f3914
Packit 6f3914
.. _info_command-label:
Packit 6f3914
Packit 6f3914
------------
Packit 6f3914
Info Command
Packit 6f3914
------------
Packit 6f3914
Packit 6f3914
``dnf [options] info [<package-file-spec>...]``
Packit 6f3914
    Lists description and summary information about installed and available packages.
Packit 6f3914
Packit 6f3914
This command by default does not force a sync of expired metadata. See also :ref:`\metadata_synchronization-label`.
Packit 6f3914
Packit 6f3914
.. _install_command-label:
Packit 6f3914
Packit 6f3914
---------------
Packit 6f3914
Install Command
Packit 6f3914
---------------
Packit 6f3914
Packit 6f3914
``dnf [options] install <spec>...``
Packit 6f3914
    Makes sure that the given packages and their dependencies are installed
Packit 6f3914
    on the system. Each ``<spec>`` can be either a :ref:`<package-spec> <specifying_packages-label>`,
Packit 6f3914
    or a \@\ :ref:`\<module-spec>\ <specifying_modules-label>`, or a \@\ :ref:`\<group-spec>\ <specifying_groups-label>`.
Packit 6f3914
    See :ref:`\Install Examples\ <install_examples-label>`.
Packit 6f3914
    If a given package or provide cannot be (and is not already) installed,
Packit 6f3914
    the exit code will be non-zero.
Packit 6f3914
    If the ``<spec>`` matches both a \@\ :ref:`\<module-spec>\ <specifying_modules-label>` and
Packit 6f3914
    a \@\ :ref:`\<group-spec>\ <specifying_groups-label>`, only the module is installed.
Packit 6f3914
Packit 6f3914
    When :ref:`<package-spec> <specifying_packages-label>` to specify the exact version
Packit 6f3914
    of the package is given, DNF will install the desired version, no matter which
Packit 6f3914
    version of the package is already installed. The former version of the package
Packit 6f3914
    will be removed in the case of non-installonly package.
Packit 6f3914
Packit 6f3914
    There are also a few specific install commands ``install-n``, ``install-na`` and
Packit 6f3914
    ``install-nevra`` that allow the specification of an exact argument in the NEVRA format.
Packit 6f3914
Packit 6f3914
    See also :ref:`\configuration_files_replacement_policy-label`.
Packit 6f3914
Packit 6f3914
.. _install_examples-label:
Packit 6f3914
Packit 6f3914
Install Examples
Packit 6f3914
----------------
Packit 6f3914
Packit 6f3914
``dnf install tito``
Packit 6f3914
    Install the ``tito`` package (tito is the package name).
Packit 6f3914
Packit 6f3914
``dnf install ~/Downloads/tito-0.6.2-1.fc22.noarch.rpm``
Packit 6f3914
    Install a local rpm file tito-0.6.2-1.fc22.noarch.rpm from the ~/Downloads/
Packit 6f3914
    directory.
Packit 6f3914
Packit 6f3914
``dnf install tito-0.5.6-1.fc22``
Packit 6f3914
    Install the package with a specific version. If the package is already installed it
Packit 6f3914
    will automatically try to downgrade or upgrade to the specific version.
Packit 6f3914
Packit 6f3914
``dnf --best install tito``
Packit 6f3914
    Install the latest available version of the package. If the package is already installed it
Packit 6f3914
    will try to automatically upgrade to the latest version. If the latest version
Packit 6f3914
    of the package cannot be installed, the installation will fail.
Packit 6f3914
Packit 6f3914
``dnf install vim``
Packit 6f3914
    DNF will automatically recognize that vim is not a package name, but
Packit 6f3914
    will look up and install a package that provides vim with all the required
Packit 6f3914
    dependencies. Note: Package name match has precedence over package provides
Packit 6f3914
    match.
Packit 6f3914
Packit 6f3914
``dnf install https://kojipkgs.fedoraproject.org//packages/tito/0.6.0/1.fc22/noarch/tito-0.6.0-1.fc22.noarch.rpm``
Packit 6f3914
    Install a package directly from a URL.
Packit 6f3914
Packit 6f3914
``dnf install '@docker'``
Packit 6f3914
    Install all default profiles of module 'docker' and their RPMs. Module streams get enabled accordingly.
Packit 6f3914
Packit 6f3914
``dnf install '@Web Server'``
Packit 6f3914
    Install the 'Web Server' environmental group.
Packit 6f3914
Packit 6f3914
``dnf install /usr/bin/rpmsign``
Packit 6f3914
    Install a package that provides the /usr/bin/rpmsign file.
Packit 6f3914
Packit 6f3914
``dnf -y install tito --setopt=install_weak_deps=False``
Packit 6f3914
    Install the ``tito`` package (tito is the package name) without weak deps. Weak deps are not required for
Packit 6f3914
    core functionality of the package, but they enhance the original package (like extended
Packit 6f3914
    documentation, plugins, additional functions, etc.).
Packit 6f3914
Packit 6f3914
``dnf install --advisory=FEDORA-2018-b7b99fe852 \*``
Packit 6f3914
    Install all packages that belong to the "FEDORA-2018-b7b99fe852" advisory.
Packit 6f3914
Packit 6f3914
.. _list_command-label:
Packit 6f3914
Packit 6f3914
------------
Packit 6f3914
List Command
Packit 6f3914
------------
Packit 6f3914
Packit 6f3914
Prints lists of packages depending on the packages' relation to the
Packit 6f3914
system. A package is ``installed`` if it is present in the RPMDB, and it is ``available``
Packit 6f3914
if it is not installed but is present in a repository that DNF knows about.
Packit 6f3914
The list command can also limit the displayed packages according to specific criteria,
Packit 6f3914
e.g. to only those that update an installed package. The :ref:`exclude
Packit 6f3914
<exclude-label>` option in the configuration file can influence the
Packit 6f3914
result, but if the \-\ :ref:`-disableexcludes <disableexcludes-label>` command line
Packit 6f3914
option is used, it ensures that all installed packages will be listed.
Packit 6f3914
Packit 6f3914
``dnf [options] list [--all] [<package-file-spec>...]``
Packit 6f3914
    Lists all packages, present in the RPMDB, in a repository or both.
Packit 6f3914
Packit 6f3914
``dnf [options] list --installed [<package-file-spec>...]``
Packit 6f3914
    Lists installed packages.
Packit 6f3914
Packit 6f3914
``dnf [options] list --available [<package-file-spec>...]``
Packit 6f3914
    Lists available packages.
Packit 6f3914
Packit 6f3914
``dnf [options] list --extras [<package-file-spec>...]``
Packit 6f3914
    Lists extras, that is packages installed on the system that are not
Packit 6f3914
    available in any known repository.
Packit 6f3914
Packit 6f3914
``dnf [options] list --obsoletes [<package-file-spec>...]``
Packit 6f3914
    List packages installed on the system that are obsoleted by packages in
Packit 6f3914
    any known repository.
Packit 6f3914
Packit 6f3914
``dnf [options] list --recent [<package-file-spec>...]``
Packit 6f3914
    List packages recently added into the repositories.
Packit 6f3914
Packit 6f3914
``dnf [options] list --upgrades [<package-file-spec>...]``
Packit 6f3914
    List upgrades available for the installed packages.
Packit 6f3914
Packit 6f3914
``dnf [options] list --autoremove``
Packit 6f3914
    List packages which will be removed by the ``dnf autoremove`` command.
Packit 6f3914
Packit 6f3914
This command by default does not force a sync of expired metadata. See also :ref:`\metadata_synchronization-label`.
Packit 6f3914
Packit 6f3914
.. _localinstall_command-label:
Packit 6f3914
Packit 6f3914
--------------------
Packit 6f3914
Localinstall Command
Packit 6f3914
--------------------
Packit 6f3914
Packit 6f3914
``dnf [options] localinstall <spec>...``
Packit 6f3914
    Deprecated alias for the :ref:`\install_command-label`.
Packit 6f3914
Packit 6f3914
.. _makecache_command-label:
Packit 6f3914
Packit 6f3914
-----------------
Packit 6f3914
Makecache Command
Packit 6f3914
-----------------
Packit 6f3914
Packit 6f3914
``dnf [options] makecache``
Packit 6f3914
    Downloads and caches metadata for all known repos. Tries to
Packit 6f3914
    avoid downloading whenever possible (e.g. when the local metadata hasn't
Packit 6f3914
    expired yet or when the metadata timestamp hasn't changed).
Packit 6f3914
Packit 6f3914
``dnf [options] makecache --timer``
Packit 6f3914
    Like plain ``makecache``, but instructs DNF to be more resource-aware,
Packit 6f3914
    meaning it will not do anything if running on battery power and will terminate
Packit 6f3914
    immediately if it's too soon after the last successful ``makecache`` run
Packit 6f3914
    (see :manpage:`dnf.conf(5)`, :ref:`metadata_timer_sync
Packit 6f3914
    <metadata_timer_sync-label>`).
Packit 6f3914
Packit 6f3914
.. _mark_command-label:
Packit 6f3914
Packit 6f3914
-------------
Packit 6f3914
Mark Command
Packit 6f3914
-------------
Packit 6f3914
Packit 6f3914
``dnf mark install <package-spec>...``
Packit 6f3914
    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 :ref:`\autoremove_command-label` or :ref:`\remove_command-label` along with `clean_requirements_on_remove` configuration option set to ``True`` is executed.
Packit 6f3914
Packit 6f3914
``dnf mark remove <package-spec>...``
Packit 6f3914
    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 stays installed on the system but will be removed when :ref:`\autoremove_command-label` or :ref:`\remove_command-label` along with `clean_requirements_on_remove` configuration option set to ``True`` is executed. You should use this operation instead of :ref:`\remove_command-label` if you're not sure whether the package is a requirement of other user installed packages on the system.
Packit 6f3914
Packit 6f3914
``dnf mark group <package-spec>...``
Packit 6f3914
    Marks the specified packages as installed by group. This can be useful if any package was
Packit 6f3914
    installed as a dependency or a user and is desired to be protected and handled as a group
Packit 6f3914
    member like during group remove.
Packit 6f3914
Packit 6f3914
.. _module_command-label:
Packit 6f3914
Packit 6f3914
---------------
Packit 6f3914
Module Command
Packit 6f3914
---------------
Packit 6f3914
Packit 6f3914
Modularity overview is available at :ref:`man page dnf.modularity(7) <modularity-label>`.
Packit 6f3914
Module subcommands take :ref:`\<module-spec>\ <specifying_modules-label>`... arguments that specify modules or profiles.
Packit 6f3914
Packit 6f3914
.. _module_install_command-label:
Packit 6f3914
Packit 6f3914
``dnf [options] module install <module-spec>...``
Packit 6f3914
    Install module profiles, including their packages.
Packit 6f3914
    In case no profile was provided, all default profiles get installed.
Packit 6f3914
    Module streams get enabled accordingly.
Packit 6f3914
Packit 6f3914
    This command cannot be used for switching module streams. It is recommended to remove all
Packit 6f3914
    installed content from the module and reset the module using the
Packit 6f3914
    :ref:`reset <module_reset_command-label>` command. After you reset the module, you can install
Packit 6f3914
    the other stream.
Packit 6f3914
Packit 6f3914
``dnf [options] module update <module-spec>...``
Packit 6f3914
    Update packages associated with an active module stream, optionally restricted to a profile.
Packit 6f3914
    If the `profile_name` is provided, only the packages referenced by that profile will be updated.
Packit 6f3914
Packit 6f3914
``dnf [options] module remove <module-spec>...``
Packit 6f3914
    Remove installed module profiles, including packages that were installed with the
Packit 6f3914
    :ref:`dnf module install <module_install_command-label>` command. Will not remove packages
Packit 6f3914
    required by other installed module profiles or by other user-installed packages.
Packit 6f3914
    In case no profile was provided, all installed profiles get removed.
Packit 6f3914
Packit 6f3914
``dnf [options] module remove --all <module-spec>...``
Packit 6f3914
    Remove installed module profiles, including packages that were installed with the
Packit 6f3914
    :ref:`dnf module install <module_install_command-label>` command.
Packit 6f3914
    With --all option it additionally removes all packages whose names are provided by specified
Packit 6f3914
    modules. Packages required by other installed module profiles and packages whose names are also
Packit 6f3914
    provided by any other module are not removed.
Packit 6f3914
Packit 6f3914
.. _module_enable_command-label:
Packit 6f3914
Packit 6f3914
``dnf [options] module enable <module-spec>...``
Packit 6f3914
    Enable a module stream and make the stream RPMs available in the package set.
Packit 6f3914
Packit 6f3914
    Modular dependencies are resolved, dependencies checked and also recursively enabled. In case
Packit 6f3914
    of modular dependency issue the operation will be rejected. To perform the action anyway please use
Packit 6f3914
    \-\ :ref:`-skip-broken <skip-broken_option-label>` option.
Packit 6f3914
Packit 6f3914
    This command cannot be used for switching module streams. It is recommended to remove all
Packit 6f3914
    installed content from the module, and reset the module using the
Packit 6f3914
    :ref:`reset <module_reset_command-label>` command. After you reset the module, you can enable
Packit 6f3914
    the other stream.
Packit 6f3914
Packit 6f3914
.. _module_disable_command-label:
Packit 6f3914
Packit 6f3914
``dnf [options] module disable <module-name>...``
Packit 6f3914
    Disable a module. All related module streams will become unavailable.
Packit 6f3914
    Consequently, all installed profiles will be removed and the module RPMs
Packit 6f3914
    will become unavailable in the package set. In case of modular
Packit 6f3914
    dependency issue the operation will be rejected. To perform the action anyway please use \-\
Packit 6f3914
    :ref:`-skip-broken <skip-broken_option-label>` option.
Packit 6f3914
Packit 6f3914
.. _module_reset_command-label:
Packit 6f3914
Packit 6f3914
``dnf [options] module reset <module-name>...``
Packit 6f3914
    Reset module state so it's no longer enabled or disabled.
Packit 6f3914
    Consequently, all installed profiles will be removed and
Packit 6f3914
    only RPMs from the default stream will be available in the package set.
Packit 6f3914
Packit 6f3914
.. _module_provide_command-label:
Packit 6f3914
Packit 6f3914
``dnf [options] module provides <package-name-spec>...``
Packit 6f3914
    Lists all modular packages matching ``<package-name-spec>`` from all modules (including disabled), along with the modules and streams they belong to.
Packit 6f3914
Packit 6f3914
``dnf [options] module list [--all] [module_name...]``
Packit 6f3914
    Lists all module streams, their profiles and states (enabled, disabled, default).
Packit 6f3914
Packit 6f3914
``dnf [options] module list --enabled [module_name...]``
Packit 6f3914
    Lists module streams that are enabled.
Packit 6f3914
Packit 6f3914
``dnf [options] module list --disabled [module_name...]``
Packit 6f3914
    Lists module streams that are disabled.
Packit 6f3914
Packit 6f3914
``dnf [options] module list --installed [module_name...]``
Packit 6f3914
    List module streams with installed profiles.
Packit 6f3914
Packit 6f3914
``dnf [options] module info <module-spec>...``
Packit 6f3914
    Print detailed information about given module stream.
Packit 6f3914
Packit 6f3914
``dnf [options] module info --profile <module-spec>...``
Packit 6f3914
    Print detailed information about given module profiles.
Packit 6f3914
Packit 6f3914
``dnf [options] module repoquery <module-spec>...``
Packit 6f3914
    List all available packages belonging to selected modules.
Packit 6f3914
Packit 6f3914
``dnf [options] module repoquery --available <module-spec>...``
Packit 6f3914
    List all available packages belonging to selected modules.
Packit 6f3914
Packit 6f3914
``dnf [options] module repoquery --installed <module-spec>...``
Packit 6f3914
    List all installed packages with same name like packages belonging to selected modules.
Packit 6f3914
Packit 6f3914
.. _provides_command-label:
Packit 6f3914
Packit 6f3914
----------------
Packit 6f3914
Provides Command
Packit 6f3914
----------------
Packit 6f3914
Packit 6f3914
``dnf [options] provides <provide-spec>``
Packit 6f3914
    Finds the packages providing the given ``<provide-spec>``. This is useful
Packit 6f3914
    when one knows a filename and wants to find what package (installed or not)
Packit 6f3914
    provides this file.
Packit 6f3914
    The ``<provide-spec>`` is gradually looked for at following locations:
Packit 6f3914
Packit 6f3914
    1. The ``<provide-spec>`` is matched with all file provides of any available package::
Packit 6f3914
Packit 6f3914
        $ dnf provides /usr/bin/gzip
Packit 6f3914
        gzip-1.9-9.fc29.x86_64 : The GNU data compression program
Packit 6f3914
        Matched from:
Packit 6f3914
        Filename    : /usr/bin/gzip
Packit 6f3914
Packit 6f3914
    2. Then all provides of all available packages are searched::
Packit 6f3914
Packit 6f3914
        $ dnf provides "gzip(x86-64)"
Packit 6f3914
        gzip-1.9-9.fc29.x86_64 : The GNU data compression program
Packit 6f3914
        Matched from:
Packit 6f3914
        Provide     : gzip(x86-64) = 1.9-9.fc29
Packit 6f3914
Packit 6f3914
    3. DNF assumes that the ``<provide-spec>`` is a system command, prepends it with ``/usr/bin/``, ``/usr/sbin/`` prefixes (one at a time) and does the file provides search again. For legacy reasons (packages that didn't do UsrMove) also ``/bin`` and ``/sbin`` prefixes are being searched::
Packit 6f3914
Packit 6f3914
        $ dnf provides zless
Packit 6f3914
        gzip-1.9-9.fc29.x86_64 : The GNU data compression program
Packit 6f3914
        Matched from:
Packit 6f3914
        Filename    : /usr/bin/zless
Packit 6f3914
Packit 6f3914
    4. If this last step also fails, DNF returns "Error: No Matches found".
Packit 6f3914
Packit 6f3914
    This command by default does not force a sync of expired metadata. See also :ref:`\metadata_synchronization-label`.
Packit 6f3914
Packit 6f3914
.. _reinstall_command-label:
Packit 6f3914
Packit 6f3914
-----------------
Packit 6f3914
Reinstall Command
Packit 6f3914
-----------------
Packit 6f3914
Packit 6f3914
``dnf [options] reinstall <package-spec>...``
Packit 6f3914
    Installs the specified packages, fails if some of the packages are either
Packit 6f3914
    not installed or not available (i.e. there is no repository where to
Packit 6f3914
    download the same RPM).
Packit 6f3914
Packit 6f3914
.. _remove_command-label:
Packit 6f3914
Packit 6f3914
--------------
Packit 6f3914
Remove Command
Packit 6f3914
--------------
Packit 6f3914
Packit 6f3914
``dnf [options] remove <package-spec>...``
Packit 6f3914
    Removes the specified packages from the system along with any packages depending on the packages being removed. Each ``<spec>`` can be either a ``<package-spec>``, which specifies a package directly, or a ``@<group-spec>``, which specifies an (environment) group which contains it. If ``clean_requirements_on_remove`` is enabled (the default), also removes any dependencies that are no longer needed.
Packit 6f3914
Packit 6f3914
``dnf [options] remove --duplicates``
Packit 6f3914
    Removes older versions of duplicate packages. To ensure the integrity of the system it
Packit 6f3914
    reinstalls the newest package. In some cases the command cannot resolve conflicts. In such cases
Packit 6f3914
    the :ref:`dnf shell <shell_command-label>` command with ``remove --duplicates`` and ``upgrade``
Packit 6f3914
    dnf-shell sub-commands could help.
Packit 6f3914
Packit 6f3914
``dnf [options] remove --oldinstallonly``
Packit b53504
    Removes old installonly packages, keeping only latest versions and version of running kernel.
Packit 6f3914
Packit 6f3914
    There are also a few specific remove commands ``remove-n``, ``remove-na`` and ``remove-nevra``
Packit 6f3914
    that allow the specification of an exact argument in the NEVRA format.
Packit 6f3914
Packit 6f3914
Remove Examples
Packit 6f3914
---------------
Packit 6f3914
Packit 6f3914
``dnf remove acpi tito``
Packit 6f3914
    Remove the ``acpi`` and ``tito`` packages.
Packit 6f3914
Packit 6f3914
``dnf remove $(dnf repoquery --extras --exclude=tito,acpi)``
Packit 6f3914
    Remove packages not present in any repository, but don't remove the ``tito``
Packit 6f3914
    and ``acpi`` packages (they still might be removed if they depend on some of the removed packages).
Packit 6f3914
Packit 6f3914
Remove older versions of duplicated packages (an equivalent of yum's `package-cleanup --cleandups`)::
Packit 6f3914
Packit 6f3914
    dnf remove --duplicates
Packit 6f3914
Packit 6f3914
.. _repoinfo_command-label:
Packit 6f3914
Packit 6f3914
----------------
Packit 6f3914
Repoinfo Command
Packit 6f3914
----------------
Packit 6f3914
Packit 6f3914
    An alias for the :ref:`repolist <repolist_command-label>` command
Packit 6f3914
    that provides more detailed information like ``dnf repolist -v``.
Packit 6f3914
Packit 6f3914
.. _repolist_command-label:
Packit 6f3914
Packit 6f3914
----------------
Packit 6f3914
Repolist Command
Packit 6f3914
----------------
Packit 6f3914
Packit 6f3914
``dnf [options] repolist [--enabled|--disabled|--all]``
Packit 6f3914
    Depending on the exact command lists enabled, disabled or all known
Packit 6f3914
    repositories. Lists all enabled repositories by default. Provides more
Packit 6f3914
    detailed information when ``-v`` option is used.
Packit 6f3914
Packit 6f3914
This command by default does not force a sync of expired metadata. See also :ref:`\metadata_synchronization-label`.
Packit 6f3914
Packit 6f3914
.. _repoquery_command-label:
Packit 6f3914
Packit 6f3914
-----------------
Packit 6f3914
Repoquery Command
Packit 6f3914
-----------------
Packit 6f3914
Packit 6f3914
``dnf [options] repoquery [<select-options>] [<query-options>] [<package-file-spec>]``
Packit 6f3914
    Searches available DNF repositories for selected packages and displays the requested information about them. It
Packit 6f3914
    is an equivalent of ``rpm -q`` for remote repositories.
Packit 6f3914
Packit 6f3914
``dnf [options] repoquery --querytags``
Packit 6f3914
    Provides the list of tags recognized by the \-\ :ref:`-queryformat <queryformat_repoquery-label>` repoquery option.
Packit 6f3914
Packit 6f3914
    There are also a few specific repoquery commands ``repoquery-n``, ``repoquery-na`` and ``repoquery-nevra``
Packit 6f3914
    that allow the specification of an exact argument in the NEVRA format (does not affect arguments of options like --whatprovides <arg>, ...).
Packit 6f3914
Packit 6f3914
Select Options
Packit 6f3914
--------------
Packit 6f3914
Packit 6f3914
Together with ``<package-file-spec>``, control what packages are displayed in the output. If ``<package-file-spec>`` is given, limits the resulting set of
Packit 6f3914
packages to those matching the specification. All packages are considered if no ``<package-file-spec>`` is specified.
Packit 6f3914
Packit 6f3914
``<package-file-spec>``
Packit 6f3914
    Package specification in the NEVRA format (name[-[epoch:]version[-release]][.arch]), a package provide or a file provide. See :ref:`Specifying Packages
Packit 6f3914
    <specifying_packages-label>`.
Packit 6f3914
Packit 6f3914
``-a``, ``--all``
Packit 6f3914
    Query all packages (for rpmquery compatibility, also a shorthand for repoquery '*' or repoquery
Packit 6f3914
    without arguments).
Packit 6f3914
Packit 6f3914
``--arch <arch>[,<arch>...], --archlist <arch>[,<arch>...]``
Packit 6f3914
    Limit the resulting set only to packages of selected architectures (default is all
Packit 6f3914
    architectures). In some cases the result is affected by the basearch of the running system, therefore
Packit 6f3914
    to run repoquery for an arch incompatible with your system use the ``--forcearch=<arch>``
Packit 6f3914
    option to change the basearch.
Packit 6f3914
Packit 6f3914
``--duplicates``
Packit 6f3914
    Limit the resulting set to installed duplicate packages (i.e. more package versions
Packit 6f3914
    for the same name and architecture). Installonly packages are excluded from this set.
Packit 6f3914
Packit 6f3914
``--unneeded``
Packit 6f3914
    Limit the resulting set to leaves packages that were installed as dependencies so they are no longer needed. This
Packit 6f3914
    switch lists packages that are going to be removed after executing the ``dnf autoremove`` command.
Packit 6f3914
Packit 6f3914
``--available``
Packit 6f3914
    Limit the resulting set to available packages only (set by default).
Packit 6f3914
Packit 6f3914
``--disable-modular-filtering``
Packit 6f3914
    Disables filtering of modular packages, so that packages of inactive module streams are included in the result.
Packit 6f3914
Packit 6f3914
``--extras``
Packit 6f3914
    Limit the resulting set to packages that are not present in any of the available repositories.
Packit 6f3914
Packit 6f3914
``-f <file>``, ``--file <file>``
Packit 6f3914
    Limit the resulting set only to the package that owns ``<file>``.
Packit 6f3914
Packit 6f3914
``--installed``
Packit 6f3914
    Limit the resulting set to installed packages only. The :ref:`exclude <exclude-label>` option in the configuration file
Packit 6f3914
    might influence the result, but if the command line option  \-\
Packit 6f3914
    :ref:`-disableexcludes <disableexcludes-label>` is used, it ensures that all installed packages will be listed.
Packit 6f3914
Packit 6f3914
``--installonly``
Packit 6f3914
    Limit the resulting set to installed installonly packages.
Packit 6f3914
Packit 6f3914
``--latest-limit <number>``
Packit 6f3914
    Limit the resulting set to <number> of latest packages for every package name and architecture.
Packit 6f3914
    If <number> is negative, skip <number> of latest packages. For a negative <number> use the
Packit 6f3914
    ``--latest-limit=<number>`` syntax.
Packit 6f3914
Packit 6f3914
``--recent``
Packit 6f3914
    Limit the resulting set to packages that were recently edited.
Packit 6f3914
Packit 6f3914
``--repo <repoid>``
Packit 6f3914
    Limit the resulting set only to packages from a repository identified by ``<repoid>``.
Packit 6f3914
    Can be used multiple times with accumulative effect.
Packit 6f3914
Packit 6f3914
``--unsatisfied``
Packit 6f3914
    Report unsatisfied dependencies among installed packages (i.e. missing requires and
Packit 6f3914
    and existing conflicts).
Packit 6f3914
Packit 6f3914
``--upgrades``
Packit 6f3914
    Limit the resulting set to packages that provide an upgrade for some already installed package.
Packit 6f3914
Packit 6f3914
``--userinstalled``
Packit 6f3914
    Limit the resulting set to packages installed by the user. The :ref:`exclude <exclude-label>` option
Packit 6f3914
    in the configuration file might influence the result, but if the command line option  \-\
Packit 6f3914
    :ref:`-disableexcludes <disableexcludes-label>` is used, it ensures that all installed packages will be listed.
Packit 6f3914
Packit 6f3914
.. _whatdepends_option-label:
Packit 6f3914
Packit 6f3914
``--whatdepends <capability>``
Packit 6f3914
    Limit the resulting set only to packages that require, enhance, recommend, suggest or
Packit 6f3914
    supplement ``<capability>``.
Packit 6f3914
Packit 6f3914
``--whatconflicts <capability>``
Packit 6f3914
    Limit the resulting set only to packages that conflict ``<capability>``.
Packit 6f3914
Packit 6f3914
``--whatenhances <capability>``
Packit 6f3914
    Limit the resulting set only to packages that enhance ``<capability>``. Use \-\
Packit 6f3914
    :ref:`-whatdepends <whatdepends_option-label>` if you want to list all depending packages.
Packit 6f3914
Packit 6f3914
``--whatobsoletes <capability>``
Packit 6f3914
    Limit the resulting set only to packages that obsolete ``<capability>``.
Packit 6f3914
Packit 6f3914
``--whatprovides <capability>``
Packit 6f3914
    Limit the resulting set only to packages that provide ``<capability>``.
Packit 6f3914
Packit 6f3914
``--whatrecommends <capability>``
Packit 6f3914
    Limit the resulting set only to packages that recommend ``<capability>``. Use \-\
Packit 6f3914
    :ref:`-whatdepends <whatdepends_option-label>` if you want to list all depending packages.
Packit 6f3914
Packit 6f3914
``--whatrequires <capability>``
Packit 6f3914
    Limit the resulting set only to packages that require ``<capability>``. Use \-\
Packit 6f3914
    :ref:`-whatdepends <whatdepends_option-label>` if you want to list all depending packages.
Packit 6f3914
Packit 6f3914
``--whatsuggests <capability>``
Packit 6f3914
    Limit the resulting set only to packages that suggest ``<capability>``. Use \-\
Packit 6f3914
    :ref:`-whatdepends <whatdepends_option-label>` if you want to list all depending packages.
Packit 6f3914
Packit 6f3914
``--whatsupplements <capability>``
Packit 6f3914
    Limit the resulting set only to packages that supplement ``<capability>``. Use \-\
Packit 6f3914
    :ref:`-whatdepends <whatdepends_option-label>` if you want to list all depending packages.
Packit 6f3914
Packit 6f3914
``--alldeps``
Packit 6f3914
    This option is stackable with ``--whatrequires`` or \-\
Packit 6f3914
    :ref:`-whatdepends <whatdepends_option-label>` only. Additionally it adds all packages requiring
Packit 6f3914
    the package features to the result set (used as default).
Packit 6f3914
Packit 6f3914
``--exactdeps``
Packit 6f3914
    This option is stackable with ``--whatrequires`` or \-\
Packit 6f3914
    :ref:`-whatdepends <whatdepends_option-label>` only. Limit the resulting set only to packages
Packit 6f3914
    that require ``<capability>`` specified by --whatrequires.
Packit 6f3914
Packit 6f3914
``--srpm``
Packit 6f3914
    Operate on the corresponding source RPM.
Packit 6f3914
Packit 6f3914
Query Options
Packit 6f3914
-------------
Packit 6f3914
Packit 6f3914
Set what information is displayed about each package.
Packit 6f3914
Packit 6f3914
The following are mutually exclusive, i.e. at most one can be specified. If no query option is given, matching packages
Packit 6f3914
are displayed in the standard NEVRA notation.
Packit 6f3914
Packit 6f3914
.. _info_repoquery-label:
Packit 6f3914
Packit 6f3914
``-i, --info``
Packit 6f3914
    Show detailed information about the package.
Packit 6f3914
Packit 6f3914
``-l, --list``
Packit 6f3914
    Show the list of files in the package.
Packit 6f3914
Packit 6f3914
``-s, --source``
Packit 6f3914
    Show the package source RPM name.
Packit 6f3914
Packit 6f3914
``--changelogs``
Packit 6f3914
    Print the package changelogs.
Packit 6f3914
Packit 6f3914
``--conflicts``
Packit 6f3914
    Display capabilities that the package conflicts with. Same as ``--qf "%{conflicts}``.
Packit 6f3914
Packit 6f3914
``--depends``
Packit 6f3914
    Display capabilities that the package depends on, enhances, recommends, suggests or
Packit 6f3914
    supplements.
Packit 6f3914
Packit 6f3914
``--enhances``
Packit 6f3914
    Display capabilities enhanced by the package. Same as ``--qf "%{enhances}""``.
Packit 6f3914
Packit 6f3914
``--location``
Packit 6f3914
    Show a location where the package could be downloaded from.
Packit 6f3914
Packit 6f3914
``--obsoletes``
Packit 6f3914
    Display capabilities that the package obsoletes. Same as ``--qf "%{obsoletes}"``.
Packit 6f3914
Packit 6f3914
``--provides``
Packit 6f3914
    Display capabilities provided by the package. Same as ``--qf "%{provides}"``.
Packit 6f3914
Packit 6f3914
``--recommends``
Packit 6f3914
    Display capabilities recommended by the package. Same as ``--qf "%{recommends}"``.
Packit 6f3914
Packit 6f3914
``--requires``
Packit 6f3914
    Display capabilities that the package depends on. Same as ``--qf "%{requires}"``.
Packit 6f3914
Packit 6f3914
``--requires-pre``
Packit 6f3914
    Display capabilities that the package depends on for running a ``%pre`` script.
Packit 6f3914
    Same as ``--qf "%{requires-pre}"``.
Packit 6f3914
Packit 6f3914
``--suggests``
Packit 6f3914
    Display capabilities suggested by the package. Same as ``--qf "%{suggests}"``.
Packit 6f3914
Packit 6f3914
``--supplements``
Packit 6f3914
    Display capabilities supplemented by the package. Same as ``--qf "%{supplements}"``.
Packit 6f3914
Packit 6f3914
``--tree``
Packit 6f3914
    Display a recursive tree of packages with capabilities specified by one of the following supplementary options:
Packit 6f3914
    ``--whatrequires``, ``--requires``, ``--conflicts``, ``--enhances``, ``--suggests``, ``--provides``,
Packit 6f3914
    ``--supplements``, ``--recommends``.
Packit 6f3914
Packit 6f3914
.. _deplist_option-label:
Packit 6f3914
Packit 6f3914
``--deplist``
Packit 6f3914
    Produce a list of all direct dependencies and what packages provide those
Packit 6f3914
    dependencies for the given packages. The result only shows the newest
Packit 6f3914
    providers (which can be changed by using --verbose).
Packit 6f3914
Packit 6f3914
``--nvr``
Packit 6f3914
    Show found packages in the name-version-release format. Same as
Packit 6f3914
    ``--qf "%{name}-%{version}-%{release}"``.
Packit 6f3914
Packit 6f3914
``--nevra``
Packit 6f3914
    Show found packages in the name-epoch:version-release.architecture format. Same as
Packit 6f3914
    ``--qf "%{name}-%{epoch}:%{version}-%{release}.%{arch}"`` (default).
Packit 6f3914
Packit 6f3914
``--envra``
Packit 6f3914
    Show found packages in the epoch:name-version-release.architecture format. Same as
Packit 6f3914
    ``--qf "%{epoch}:%{name}-%{version}-%{release}.%{arch}"``
Packit 6f3914
Packit 6f3914
.. _queryformat_repoquery-label:
Packit 6f3914
Packit 6f3914
``--qf <format>``, ``--queryformat <format>``
Packit 6f3914
    Custom display format. ``<format>`` is the string to output for each matched package. Every occurrence of
Packit 6f3914
    ``%{<tag>}`` within is replaced by the corresponding attribute of the package. The list of recognized tags can be displayed
Packit 6f3914
    by running ``dnf repoquery --querytags``.
Packit 6f3914
Packit 6f3914
``--recursive``
Packit 6f3914
    Query packages recursively. Has to be used with ``--whatrequires <REQ>``
Packit 6f3914
    (optionally with ``--alldeps``, but not with ``--exactdeps``) or with
Packit 6f3914
    ``--requires <REQ> --resolve``.
Packit 6f3914
Packit 6f3914
``--resolve``
Packit 6f3914
    resolve capabilities to originating package(s).
Packit 6f3914
Packit 6f3914
Packit 6f3914
Examples
Packit 6f3914
--------
Packit 6f3914
Packit 6f3914
Display NEVRAs of all available packages matching ``light*``::
Packit 6f3914
Packit 6f3914
    dnf repoquery 'light*'
Packit 6f3914
Packit 6f3914
Display NEVRAs of all available packages matching name ``light*`` and architecture ``noarch`` (accepts only arguments in the "<name>.<arch>" format)::
Packit 6f3914
Packit 6f3914
    dnf repoquery-na 'light*.noarch'
Packit 6f3914
Packit 6f3914
Display requires of all lighttpd packages::
Packit 6f3914
Packit 6f3914
    dnf repoquery --requires lighttpd
Packit 6f3914
Packit 6f3914
Display packages providing the requires of python packages::
Packit 6f3914
Packit 6f3914
    dnf repoquery --requires python --resolve
Packit 6f3914
Packit 6f3914
Display source rpm of ligttpd package::
Packit 6f3914
Packit 6f3914
    dnf repoquery --source lighttpd
Packit 6f3914
Packit 6f3914
Display package name that owns the given file::
Packit 6f3914
Packit 6f3914
    dnf repoquery --file /etc/lighttpd/lighttpd.conf
Packit 6f3914
Packit 6f3914
Display name, architecture and the containing repository of all lighttpd packages::
Packit 6f3914
Packit 6f3914
    dnf repoquery --queryformat '%{name}.%{arch} : %{reponame}' lighttpd
Packit 6f3914
Packit 6f3914
Display all available packages providing "webserver"::
Packit 6f3914
Packit 6f3914
    dnf repoquery --whatprovides webserver
Packit 6f3914
Packit 6f3914
Display all available packages providing "webserver" but only for "i686" architecture::
Packit 6f3914
Packit 6f3914
    dnf repoquery --whatprovides webserver --arch i686
Packit 6f3914
Packit 6f3914
Display duplicate packages::
Packit 6f3914
Packit 6f3914
    dnf repoquery --duplicates
Packit 6f3914
Packit 6f3914
Display source packages that require a <provide> for a build::
Packit 6f3914
Packit 6f3914
    dnf repoquery --disablerepo=* --enablerepo=*-source --arch=src --whatrequires <provide>
Packit 6f3914
Packit 6f3914
.. _repo_pkgs_command-label:
Packit 6f3914
Packit 6f3914
-----------------
Packit 6f3914
Repo-Pkgs Command
Packit 6f3914
-----------------
Packit 6f3914
Packit 6f3914
``dnf [options] repo-pkgs``
Packit 6f3914
    Deprecated alias for the :ref:`\repository_packages_command-label`.
Packit 6f3914
Packit 6f3914
.. _repository_packages_command-label:
Packit 6f3914
Packit 6f3914
---------------------------
Packit 6f3914
Repository-Packages Command
Packit 6f3914
---------------------------
Packit 6f3914
Packit 6f3914
The repository-packages command allows the user to run commands on top of all packages in the repository named ``<repoid>``. However, any dependency resolution takes into account packages from all enabled repositories. The ``<package-file-spec>`` and ``<package-spec>`` specifications further limit the candidates to only those packages matching at least one of them.
Packit 6f3914
Packit 6f3914
The ``info`` subcommand lists description and summary information about packages depending on the packages' relation to the repository. The ``list`` subcommand just prints lists of those packages.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> check-update [<package-file-spec>...]``
Packit 6f3914
    Non-interactively checks if updates of the specified packages in the repository are available. DNF exit code will be 100 when there are updates available and a list of the updates will be printed.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> info [--all] [<package-file-spec>...]``
Packit 6f3914
    List all related packages.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> info --installed [<package-file-spec>...]``
Packit 6f3914
    List packages installed from the repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> info --available [<package-file-spec>...]``
Packit 6f3914
    List packages available in the repository but not currently installed on the system.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> info --extras [<package-file-specs>...]``
Packit 6f3914
    List packages installed from the repository that are not available in any repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> info --obsoletes [<package-file-spec>...]``
Packit 6f3914
    List packages in the repository that obsolete packages installed on the system.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> info --recent [<package-file-spec>...]``
Packit 6f3914
    List packages recently added into the repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> info --upgrades [<package-file-spec>...]``
Packit 6f3914
    List packages in the repository that upgrade packages installed on the system.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> install [<package-spec>...]``
Packit 6f3914
    Install all packages in the repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> list [--all] [<package-file-spec>...]``
Packit 6f3914
    List all related packages.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> list --installed [<package-file-spec>...]``
Packit 6f3914
    List packages installed from the repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> list --available [<package-file-spec>...]``
Packit 6f3914
    List packages available in the repository but not currently installed on the system.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> list --extras [<package-file-spec>...]``
Packit 6f3914
    List packages installed from the repository that are not available in any repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> list --obsoletes [<package-file-spec>...]``
Packit 6f3914
    List packages in the repository that obsolete packages installed on the system.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> list --recent [<package-file-spec>...]``
Packit 6f3914
    List packages recently added into the repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> list --upgrades [<package-file-spec>...]``
Packit 6f3914
    List packages in the repository that upgrade packages installed on the system.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> move-to [<package-spec>...]``
Packit 6f3914
    Reinstall all those packages that are available in the repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> reinstall [<package-spec>...]``
Packit 6f3914
    Run the ``reinstall-old`` subcommand. If it fails, run the ``move-to`` subcommand.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> reinstall-old [<package-spec>...]``
Packit 6f3914
    Reinstall all those packages that were installed from the repository and simultaneously are available in the repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> remove [<package-spec>...]``
Packit 6f3914
    Remove all packages installed from the repository along with any packages depending on the packages being removed. If ``clean_requirements_on_remove`` is enabled (the default) also removes any dependencies that are no longer needed.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> remove-or-distro-sync [<package-spec>...]``
Packit 6f3914
    Select all packages installed from the repository. Upgrade, downgrade or keep those of them that are available in another repository to match the latest version available there and remove the others along with any packages depending on the packages being removed. If ``clean_requirements_on_remove`` is enabled (the default) also removes any dependencies that are no longer needed.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> remove-or-reinstall [<package-spec>...]``
Packit 6f3914
    Select all packages installed from the repository. Reinstall those of them that are available in another repository and remove the others along with any packages depending on the packages being removed. If ``clean_requirements_on_remove`` is enabled (the default) also removes any dependencies that are no longer needed.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> upgrade [<package-spec>...]``
Packit 6f3914
    Update all packages to the highest resolvable version available in the repository.
Packit 6f3914
Packit 6f3914
``dnf [options] repository-packages <repoid> upgrade-to <package-nevr-specs>...``
Packit 6f3914
    Update packages to the specified versions that are available in the repository. Upgrade-to is
Packit 6f3914
    a deprecated alias for the upgrade subcommand.
Packit 6f3914
Packit 6f3914
.. _search_command-label:
Packit 6f3914
Packit 6f3914
--------------
Packit 6f3914
Search Command
Packit 6f3914
--------------
Packit 6f3914
Packit 6f3914
``dnf [options] search [--all] <keywords>...``
Packit 6f3914
    Search package metadata for keywords. Keywords are matched as case-insensitive substrings, globbing is supported.
Packit 6f3914
    By default lists packages that match all requested keys (AND operation). Keys are searched in package names and summaries.
Packit 6f3914
    If the "--all" option is used, lists packages that match at least one of the keys (an OR operation).
Packit 6f3914
    In addition the keys are searched in the package descriptions and URLs.
Packit 6f3914
    The result is sorted from the most relevant results to the least.
Packit 6f3914
Packit 6f3914
This command by default does not force a sync of expired metadata. See also :ref:`\metadata_synchronization-label`.
Packit 6f3914
Packit 6f3914
.. _shell_command-label:
Packit 6f3914
Packit 6f3914
-------------
Packit 6f3914
Shell Command
Packit 6f3914
-------------
Packit 6f3914
Packit 6f3914
``dnf [options] shell [filename]``
Packit 6f3914
    Open an interactive shell for conducting multiple commands during a single execution of DNF. These commands can be issued manually
Packit 6f3914
    or passed to DNF from a file. The commands are much the same as the normal DNF command line options. There are a few additional
Packit 6f3914
    commands documented below.
Packit 6f3914
Packit 6f3914
    ``config [conf-option] [value]``
Packit 6f3914
        * Set a configuration option to a requested value. If no value is given it prints the current value.
Packit 6f3914
Packit 6f3914
    ``repo [list|enable|disable] [repo-id]``
Packit 6f3914
        * list: list repositories and their status
Packit 6f3914
        * enable: enable repository
Packit 6f3914
        * disable: disable repository
Packit 6f3914
Packit 6f3914
    ``transaction [list|reset|solve|run]``
Packit 6f3914
        * list: resolve and list the content of the transaction
Packit 6f3914
        * reset: reset the transaction
Packit 6f3914
        * run: resolve and run the transaction
Packit 6f3914
Packit 6f3914
.. _swap_command-label:
Packit 6f3914
Packit 6f3914
------------
Packit 6f3914
Swap Command
Packit 6f3914
------------
Packit 6f3914
Packit 6f3914
``dnf [options] swap <remove-spec> <install-spec>``
Packit 6f3914
Packit 6f3914
    Remove spec and install spec in one transaction. Each ``<spec>`` can be either a
Packit 6f3914
    :ref:`<package-spec> <specifying_packages-label>`, which specifies a package directly, or a
Packit 6f3914
    ``@<group-spec>``, which specifies an (environment) group which contains it. Automatic
Packit 6f3914
    conflict solving is provided in DNF by the --allowerasing option that provides the functionality of the swap
Packit 6f3914
    command automatically.
Packit 6f3914
Packit 6f3914
.. _update_command-label:
Packit 6f3914
Packit 6f3914
--------------
Packit 6f3914
Update Command
Packit 6f3914
--------------
Packit 6f3914
Packit 6f3914
``dnf [options] update``
Packit 6f3914
    Deprecated alias for the :ref:`\upgrade_command-label`.
Packit 6f3914
Packit 6f3914
.. _updateinfo_command-label:
Packit 6f3914
Packit 6f3914
------------------
Packit 6f3914
Updateinfo Command
Packit 6f3914
------------------
Packit 6f3914
Packit 6f3914
``dnf [options] updateinfo [--summary|--list|--info] [<availability>] [<spec>...]``
Packit 6f3914
    Display information about update advisories.
Packit 6f3914
Packit 6f3914
    Depending on the output type, DNF displays just counts of advisory types
Packit 6f3914
    (omitted or ``--summary``), list of advisories (``--list``) or detailed
Packit 6f3914
    information (``--info``). When the ``-v`` option is used with ``--info``, the
Packit 6f3914
    information is even more detailed.
Packit 6f3914
Packit 6f3914
    ``<availability>`` specifies whether advisories about newer versions of
Packit 6f3914
    installed packages (omitted or ``--available``), advisories about equal and
Packit 6f3914
    older versions of installed packages (``--installed``), advisories about
Packit 6f3914
    newer versions of those installed packages for which a newer version is
Packit 6f3914
    available (``--updates``) or advisories about any versions of installed
Packit 6f3914
    packages (``--all``) are taken into account. Most of the time, ``--available``
Packit 6f3914
    and ``--updates`` displays the same output. The outputs differ only in the
Packit 6f3914
    cases when an advisory refers to a newer version but there is no enabled
Packit 6f3914
    repository which contains any newer version.
Packit 6f3914
Packit 6f3914
    Note, that ``--available`` tooks only the latest installed versions of
Packit 6f3914
    packages into account. In case of the kernel packages (when multiple
Packit 6f3914
    version could be installed simultaneously) also packages of the currently
Packit 6f3914
    running version of kernel are added.
Packit 6f3914
Packit 6f3914
    To print only advisories referencing a CVE or a bugzilla use ``--with-cve`` or
Packit 6f3914
    ``--with-bz`` options. When these switches are used also the output
Packit 6f3914
    of the ``--list`` is altered - the ID of the CVE or the bugzilla is printed
Packit 6f3914
    instead of the one of the advisory.
Packit 6f3914
Packit 6f3914
    If given and if neither ID, type (``bugfix``, ``enhancement``,
Packit 6f3914
    ``security``/``sec``) nor a package name of an advisory matches
Packit 6f3914
    ``<spec>``, the advisory is not taken into account. The matching is
Packit 6f3914
    case-sensitive and in the case of advisory IDs and package names, globbing
Packit 6f3914
    is supported.
Packit 6f3914
Packit 6f3914
    Output of the ``--summary`` option is affected by the :ref:`autocheck_running_kernel <autocheck_running_kernel-label>` configuration option.
Packit 6f3914
Packit 6f3914
Packit 6f3914
.. _update_minimal_command-label:
Packit 6f3914
Packit 6f3914
----------------------
Packit 6f3914
Update-Minimal Command
Packit 6f3914
----------------------
Packit 6f3914
Packit 6f3914
``dnf [options] update-minimal``
Packit 6f3914
    Deprecated alias for the :ref:`\upgrade_minimal_command-label`.
Packit 6f3914
Packit 6f3914
Packit 6f3914
.. _upgrade_command-label:
Packit 6f3914
Packit 6f3914
---------------
Packit 6f3914
Upgrade Command
Packit 6f3914
---------------
Packit 6f3914
Packit 6f3914
``dnf [options] upgrade``
Packit 6f3914
    Updates each package to the latest version that is both available and
Packit 6f3914
    resolvable.
Packit 6f3914
Packit 6f3914
``dnf [options] upgrade <package-spec>...``
Packit 6f3914
    Updates each specified package to the latest available version. Updates
Packit 6f3914
    dependencies as necessary.
Packit 6f3914
Packit 6f3914
``dnf [options] upgrade <package-nevr-specs>...``
Packit 6f3914
    Upgrades packages to the specified versions.
Packit 6f3914
Packit 6f3914
``dnf [options] upgrade @<spec>...``
Packit 6f3914
    Alias for the `dnf module update` command.
Packit 6f3914
Packit 6f3914
If the main ``obsoletes`` configure option is true or the ``--obsoletes`` flag
Packit 6f3914
is present, dnf will include package obsoletes in its calculations.
Packit 6f3914
For more information see :ref:`obsoletes <obsoletes_conf_option-label>`.
Packit 6f3914
Packit 6f3914
See also :ref:`\configuration_files_replacement_policy-label`.
Packit 6f3914
Packit 6f3914
.. _upgrade_minimal_command-label:
Packit 6f3914
Packit 6f3914
-----------------------
Packit 6f3914
Upgrade-Minimal Command
Packit 6f3914
-----------------------
Packit 6f3914
Packit 6f3914
``dnf [options] upgrade-minimal``
Packit 6f3914
    Updates each package to the latest available version that provides a bugfix, enhancement
Packit 6f3914
    or a fix for a security issue (security).
Packit 6f3914
Packit 6f3914
``dnf [options] upgrade-minimal <package-spec>...``
Packit 6f3914
    Updates each specified package to the latest available version that provides
Packit 6f3914
    a bugfix, enhancement or a fix for security issue (security). Updates
Packit 6f3914
    dependencies as necessary.
Packit 6f3914
Packit 6f3914
-----------------
Packit 6f3914
Update-To Command
Packit 6f3914
-----------------
Packit 6f3914
Packit 6f3914
``dnf [options] update-to <package-nevr-specs>...``
Packit 6f3914
    Deprecated alias for the :ref:`\upgrade_command-label`.
Packit 6f3914
Packit 6f3914
.. _upgrade_to_command-label:
Packit 6f3914
Packit 6f3914
------------------
Packit 6f3914
Upgrade-To Command
Packit 6f3914
------------------
Packit 6f3914
Packit 6f3914
``dnf [options] upgrade-to <package-nevr-specs>...``
Packit 6f3914
    Deprecated alias for the :ref:`\upgrade_command-label`.
Packit 6f3914
Packit 6f3914
.. _specifying_packages-label:
Packit 6f3914
Packit 6f3914
===================
Packit 6f3914
Specifying Packages
Packit 6f3914
===================
Packit 6f3914
Packit 6f3914
Many commands take a ``<package-spec>`` parameter that selects a package for
Packit 6f3914
the operation. The ``<package-spec>`` argument is matched against package
Packit 6f3914
NEVRAs, provides and file provides.
Packit 6f3914
Packit 6f3914
``<package-file-spec>`` is similar to ``<package-spec>``, except provides
Packit 6f3914
matching is not performed. Therefore, ``<package-file-spec>`` is matched only
Packit 6f3914
against NEVRAs and file provides.
Packit 6f3914
Packit 6f3914
``<package-name-spec>`` is matched against NEVRAs only.
Packit 6f3914
Packit 6f3914
-----
Packit 6f3914
Globs
Packit 6f3914
-----
Packit 6f3914
Packit 6f3914
Package specification supports the same glob pattern matching that shell does,
Packit 6f3914
in all three above mentioned packages it matches against (NEVRAs, provides and
Packit 6f3914
file provides).
Packit 6f3914
Packit 6f3914
The following patterns are supported:
Packit 6f3914
Packit 6f3914
``*``
Packit 6f3914
    Matches any number of characters.
Packit 6f3914
``?``
Packit 6f3914
    Matches any single character.
Packit 6f3914
``[]``
Packit 6f3914
    Matches any one of the enclosed characters. A pair of characters separated
Packit 6f3914
    by a hyphen denotes a range expression; any character that falls between
Packit 6f3914
    those two characters, inclusive, is matched. If the first character
Packit 6f3914
    following the ``[`` is a ``!`` or a ``^`` then any character not enclosed
Packit 6f3914
    is matched.
Packit 6f3914
``{}``
Packit 6f3914
    Matches any of the comma separated list of enclosed strings.
Packit 6f3914
Packit 6f3914
--------------
Packit 6f3914
NEVRA Matching
Packit 6f3914
--------------
Packit 6f3914
Packit 6f3914
When matching against NEVRAs, partial matching is supported. DNF tries to match
Packit 6f3914
the spec against the following list of NEVRA forms (in decreasing order of
Packit 6f3914
priority):
Packit 6f3914
Packit 6f3914
* ``name-[epoch:]version-release.arch``
Packit 6f3914
* ``name.arch``
Packit 6f3914
* ``name``
Packit 6f3914
* ``name-[epoch:]version-release``
Packit 6f3914
* ``name-[epoch:]version``
Packit 6f3914
Packit 6f3914
Note that ``name`` can in general contain dashes (e.g. ``package-with-dashes``).
Packit 6f3914
Packit 6f3914
The first form that matches any packages is used and the remaining forms are
Packit 6f3914
not tried. If none of the forms match any packages, an attempt is made to match
Packit 6f3914
the ``<package-spec>`` against full package NEVRAs. This is only relevant
Packit 6f3914
if globs are present in the ``<package-spec>``.
Packit 6f3914
Packit 6f3914
``<package-spec>`` matches NEVRAs the same way ``<package-name-spec>`` does,
Packit 6f3914
but in case matching NEVRAs fails, it attempts to match against provides and
Packit 6f3914
file provides of packages as well.
Packit 6f3914
Packit 6f3914
You can specify globs as part of any of the five NEVRA components. You can also
Packit 6f3914
specify a glob pattern to match over multiple NEVRA components (in other words,
Packit 6f3914
to match across the NEVRA separators). In that case, however, you need to write
Packit 6f3914
the spec to match against full package NEVRAs, as it is not possible to split
Packit 6f3914
such spec into NEVRA forms.
Packit 6f3914
Packit 6f3914
.. _specifying_packages_versions-label:
Packit 6f3914
Packit 6f3914
=====================================
Packit 6f3914
Specifying Exact Versions of Packages
Packit 6f3914
=====================================
Packit 6f3914
Packit 6f3914
Commands accepting the ``<package-nevr-spec>`` parameter need not only the name
Packit 6f3914
of the package, but also its version, release and optionally the
Packit 6f3914
architecture. Further, the version part can be preceded by an epoch when it is
Packit 6f3914
relevant (i.e. the epoch is non-zero).
Packit 6f3914
Packit 6f3914
.. _specifying_provides-label:
Packit 6f3914
Packit 6f3914
===================
Packit 6f3914
Specifying Provides
Packit 6f3914
===================
Packit 6f3914
Packit 6f3914
``<provide-spec>`` in command descriptions means the command operates on
Packit 6f3914
packages providing the given spec. This can either be an explicit provide, an
Packit 6f3914
implicit provide (i.e. name of the package) or a file provide. The selection is
Packit 6f3914
case-sensitive and globbing is supported.
Packit 6f3914
Packit 6f3914
.. _specifying_groups-label:
Packit 6f3914
Packit 6f3914
=================
Packit 6f3914
Specifying Groups
Packit 6f3914
=================
Packit 6f3914
Packit 6f3914
``<group-spec>`` allows one to select (environment) groups a particular operation should work
Packit 6f3914
on. It is a case insensitive string (supporting globbing characters) that is
Packit 6f3914
matched against a group's ID, canonical name and name translated into the
Packit 6f3914
current LC_MESSAGES locale (if possible).
Packit 6f3914
Packit 6f3914
.. _specifying_modules-label:
Packit 6f3914
Packit 6f3914
==================
Packit 6f3914
Specifying Modules
Packit 6f3914
==================
Packit 6f3914
Packit 6f3914
``<module-spec>`` allows one to select modules or profiles a particular operation should work
Packit 6f3914
on.
Packit 6f3914
Packit 6f3914
It is in the form of ``NAME:STREAM:VERSION:CONTEXT:ARCH/PROFILE`` and supported partial forms are the following:
Packit 6f3914
Packit 6f3914
* ``NAME``
Packit 6f3914
* ``NAME:STREAM``
Packit 6f3914
* ``NAME:STREAM:VERSION``
Packit 6f3914
* ``NAME:STREAM:VERSION:CONTEXT``
Packit 6f3914
* all above combinations with ``::ARCH`` (e.g. ``NAME::ARCH``)
Packit 6f3914
* ``NAME:STREAM:VERSION:CONTEXT:ARCH``
Packit 6f3914
* all above combinations with ``/PROFILE`` (e.g. ``NAME/PROFILE``)
Packit 6f3914
Packit 6f3914
In case stream is not specified, the enabled or the default stream is used, in this order. In case profile is not specified, the system default profile or the 'default' profile is used.
Packit 6f3914
Packit 6f3914
.. _specifying_transactions-label:
Packit 6f3914
Packit 6f3914
=======================
Packit 6f3914
Specifying Transactions
Packit 6f3914
=======================
Packit 6f3914
Packit 6f3914
``<transaction-spec>`` can be in one of several forms. If it is an integer, it
Packit 6f3914
specifies a transaction ID. Specifying ``last`` is the same as specifying the ID
Packit 6f3914
of the most recent transaction. The last form is ``last-<offset>``, where
Packit 6f3914
``<offset>`` is a positive integer. It specifies offset-th transaction preceding
Packit 6f3914
the most recent transaction.
Packit 6f3914
Packit 6f3914
.. _excluded_packages-label:
Packit 6f3914
Packit 6f3914
=================
Packit 6f3914
Package Filtering
Packit 6f3914
=================
Packit 6f3914
Packit 6f3914
Package filtering filters packages out from the available package set, making them invisible to most
Packit 6f3914
of dnf commands. They cannot be used in a transaction. Packages can be filtered out by either
Packit 6f3914
Exclude Filtering or Modular Filtering.
Packit 6f3914
Packit 6f3914
-----------------
Packit 6f3914
Exclude Filtering
Packit 6f3914
-----------------
Packit 6f3914
Packit 6f3914
Exclude Filtering is a mechanism used by a user or by a DNF plugin to modify the set of available
Packit 6f3914
packages. Exclude Filtering can be modified by either :ref:`includepkgs <include-label>` or
Packit 6f3914
:ref:`excludepkgs <exclude-label>` configuration options in
Packit 6f3914
:ref:`configuration files <conf_ref-label>`. The -:ref:`-disableexcludes <disableexcludes-label>`
Packit 6f3914
command line option can be used to override excludes from configuration files. In addition to
Packit 6f3914
user-configured excludes, plugins can also extend the set of excluded packages. To disable excludes
Packit 6f3914
from a DNF plugin you can use the -:ref:`-disableplugin <disableplugin-label>` command line option.
Packit 6f3914
Packit 6f3914
To disable all excludes for e.g. the install command you can use the following combination
Packit 6f3914
of command line options:
Packit 6f3914
Packit 6f3914
``dnf --disableexcludes=all --disableplugin=* install bash``
Packit 6f3914
Packit 6f3914
-----------------
Packit 6f3914
Modular Filtering
Packit 6f3914
-----------------
Packit 6f3914
Packit 6f3914
Please see :ref:`the modularity documentation <modularity-label>` for details on how Modular
Packit 6f3914
Filtering works.
Packit 6f3914
Packit 6f3914
With modularity, only RPM packages from ``active`` module streams are included in the available
Packit 6f3914
package set. RPM packages from ``inactive`` module streams, as well as non-modular packages with
Packit 6f3914
the same name or provides as a package from an ``active`` module stream, are filtered out. Modular
Packit 6f3914
filtering is not applied to packages added from the command line, installed packages, or packages
Packit 6f3914
from repositories with ``module_hotfixes=true`` in their ``.repo`` file.
Packit 6f3914
Packit 6f3914
Disabling of modular filtering is not recommended, because it could cause the system to get into
Packit 6f3914
a broken state. To disable modular filtering for a particular repository, specify
Packit 6f3914
``module_hotfixes=true`` in the ``.repo`` file or use ``--setopt=<repo_id>.module_hotfixes=true``.
Packit 6f3914
Packit 6f3914
To discover the module which contains an excluded package use
Packit 6f3914
:ref:`dnf module provides <module_provide_command-label>`.
Packit 6f3914
Packit 6f3914
.. _metadata_synchronization-label:
Packit 6f3914
Packit 6f3914
========================
Packit 6f3914
Metadata Synchronization
Packit 6f3914
========================
Packit 6f3914
Packit 6f3914
Correct operation of DNF depends on having access to up-to-date data from all enabled repositories but contacting remote mirrors on every operation considerably slows it down and costs bandwidth for both the client and the repository provider. The :ref:`metadata_expire <metadata_expire-label>` (see :manpage:`dnf.conf(5)`) repository configuration option is used by DNF to determine whether a particular local copy of repository data is due to be re-synced. It is crucial that the repository providers set the option well, namely to a value where it is guaranteed that if particular metadata was available in time ``T`` on the server, then all packages it references will still be available for download from the server in time ``T + metadata_expire``.
Packit 6f3914
Packit 6f3914
To further reduce the bandwidth load, some of the commands where having up-to-date metadata is not critical (e.g. the ``list`` command) do not look at whether a repository is expired and whenever any version of it is locally available to the user's account, it will be used. For non-root use, see also the ``--cacheonly`` switch. Note that in all situations the user can force synchronization of all enabled repositories with the ``--refresh`` switch.
Packit 6f3914
Packit 6f3914
.. _configuration_files_replacement_policy-label:
Packit 6f3914
Packit 6f3914
======================================
Packit 6f3914
Configuration Files Replacement Policy
Packit 6f3914
======================================
Packit 6f3914
Packit 6f3914
The updated packages could replace the old modified configuration files
Packit 6f3914
with the new ones or keep the older files. Neither of the files are actually replaced.
Packit 6f3914
To the conflicting ones RPM gives additional suffix to the origin name. Which file
Packit 6f3914
should maintain the true name after transaction is not controlled by package manager
Packit 6f3914
but is specified by each package itself, following packaging guideline.
Packit 6f3914
Packit 6f3914
.. _files-label:
Packit 6f3914
Packit 6f3914
========
Packit 6f3914
Files
Packit 6f3914
========
Packit 6f3914
Packit 6f3914
``Cache Files``
Packit 6f3914
    /var/cache/dnf
Packit 6f3914
Packit 6f3914
``Main Configuration``
Packit 6f3914
    /etc/dnf/dnf.conf
Packit 6f3914
Packit 6f3914
``Repository``
Packit 6f3914
    /etc/yum.repos.d/
Packit 6f3914
Packit 6f3914
.. _see_also-label:
Packit 6f3914
Packit 6f3914
========
Packit 6f3914
See Also
Packit 6f3914
========
Packit 6f3914
Packit 6f3914
* :manpage:`dnf.conf(5)`, :ref:`DNF Configuration Reference <conf_ref-label>`
Packit 6f3914
* :manpage:`dnf-PLUGIN(8)` for documentation on DNF plugins.
Packit 6f3914
* :manpage:`dnf.modularity(7)`, :ref:`Modularity overview <modularity-label>`.
Packit 6f3914
* `DNF`_ project homepage (https://github.com/rpm-software-management/dnf/)
Packit 6f3914
* How to report a bug (https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting)
Packit 6f3914
* `YUM`_ project homepage (http://yum.baseurl.org/)
Packit 6f3914
Packit 6f3914
.. _dnf config-manager: https://dnf-plugins-core.readthedocs.org/en/latest/config_manager.html