---
name: "dnf5-changes-from-dnf4"
section: "7"
platform: "linux"
package: "dnf5"
version: "5.4.6.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dnf5-changes-from-dnf4"
---

# dnf5-changes-from-dnf4(7)

Changes from the DNF4 This chapter describes the differences between DNF5 \<https://github.com/rpm-software-management/dnf5\> and DNF \<https://github.com/rpm-software-management/dnf\>.

## NAME

dnf5-changes-from-dnf4 - Changes from the DNF4

This chapter describes the differences between DNF5 \<https://github.com/rpm-software-management/dnf5\> and DNF \<https://github.com/rpm-software-management/dnf\>.

## CHANGES ON THE CLI

### Options

### Global options scoping

Options that cannot be applied to all commands or may be applicable but have no effect are removed from general options and implemented only for related commands.

Examples: **--best**, **--no-best** are only relevant to several transaction commands.

### Options renaming

Renaming boolean options to the following formats:

- •

  **--\<option\>** and **--no-\<option\>**

- •

  **--enable-\<option\>** and **--disable-\<option\>**

The options with original names are retained for now as compatibility aliases.

Examples: **--best** and **--no-best**.

### Strict behavior

- •

  Options **--disable-repo=REPO\_ID** and **--setopt=\[REPO\_ID.\]OPTION=VALUE** now consistently result in an error when provided with an invalid **REPO\_ID**.

- •

  The behavior is now aligned with the **--repo=REPO\_ID** and **--enable-repo=REPO\_ID**.

- •

  The **strict** configuration option is no longer considered, see the strict option deprecation for more information.

### No value separator after short options

Short options do not have a separator between the option name and the option value. E.g. **dnf -x package** is equivalent to **dnf --exclude package** and **dnf --exclude=package** long forms. But **dnf -x=package** means **dnf --exclude =package**.

### Changes to individual options

- **-4/-6**

  - •

    Dropped. Now only the **ip\_resolve** configuration option is available.

- **--disableexcludes and --disableexcludepkgs**

  - •

    Dropped. Now only the **disable\_excludes** configuration option is available.

- **--disable, --enable**

  - •

    Dropped along with the previously existing alternatives **--set-disabled** and **--set-enabled**.

  - •

    Currently, this can only be achieved through the config-manager \<#config-manager-plugin-ref-label\> plugin.

    - •

      For example, to disable the **fedora** repository: **dnf config-manager setopt fedora.enabled=0**.

- **--downloaddir**

  - •

    Dropped. Now only the **--destdir** is used for the **download** command.

  - •

    When downloading packages using the **system-upgrade** or **offline** command, the target path construction now utilizes the configured **installroot** and **cachedir** options.

- **-e, --errorlevel**

  - •

    Both the **--errorlevel** option and **errorlevel** configuration option are dropped.

- **--help-cmd**

  - •

    Dropped. Now only the **-h** or **--help** options are available.

- **--installroot**

  - •

    New behavior introduced to define from which place the configuration and variables are loaded.

  - •

    See the installroot documentation \<#installroot-misc-ref-label\> for more information.

- **--noautoremove**

  - •

    Applicable only for the **remove** command now. As a workaround for other commands, you can use **--setopt=clean\_requirements\_on\_remove=False**.

- **--obsoletes**

  - •

    Dropped. Now only the **obsoletes** configuration option is available.

- **-R, --randomwait**

  - •

    Dropped.

- **--rpmverbosity**

  - •

    Dropped. Now only the **rpmverbosity** configuration option is available.

- **--sec-severity**

  - •

    Renamed to **--advisory-severities**.

- **-v, --verbose**

  - •

    Not implemented at present. May be added for specific commands in the future.

- **--version**

  - •

    Behavior is different now. See the main man page \<#version-option-ref-label\> for more details.

### Newly introduced options

- **--allow-downgrade**

  - •

    Along with **--no-allow-downgrade**, these options enable/disable the downgrade of dependencies when resolving transactions.

  - •

    New respective configuration options have also been created.

  - •

    Applicable to **install**, **upgrade**, and related commands.

- **--dump-main-config**

  - •

    Along with related **--dump-repo-config=REPO\_ID**, these are new options to print configuration values on the standard output.

- **--from-repo**

  - •

    Packages (or their provides) explicitly specified on the command line will only be looked up in the specified repositories. These repositories are automatically enabled.

  - •

    Dependencies of the specified packages can be resolved from any enabled repository.

  - •

    Applicable to **install**, **upgrade**, **distro-sync**, **reinstall**, **downgrade**, **download**, **swap**, **do**, and related commands.

- **--installed-from-repo**

  - •

    Filters installed packages by the ID of the repository they were installed from.

  - •

    Applicable to **remove**, **upgrade**, **distro-sync**, **reinstall**, **downgrade**, **list**, **info**, **repoquery**, and related commands.

- **--offline**

  - •

    Store the transaction to be performed offline.

  - •

    Applicable to all relevant transactional commands.

  - •

    See the Offline command \<#offline-command-ref-label\> for more information.

- **--show-new-leaves**

  - •

    Show newly installed leaf packages and packages that became leaves after a transaction.

- **--skip-unavailable**

  - •

    Allow skipping packages that are not available in repositories.

  - •

    Not to be confused with the skip\_if\_unavailable \<#skip-if-unavailable-options-label\> configuration option.

  - •

    Applicable to **install**, **upgrade**, and related commands.

  - •

    See also the strict option deprecation for more information.

- **--use-host-config**

  - •

    See the main man page \<#use-host-config-option-ref-label\> for more details.

### Commands

### Optional subcommands

Commands cannot have optional subcommands. Optional subcommands were ambiguous, making it unclear whether the input was intended as a command argument or a subcommand. Subcommands are now mandatory if present.

- **Examples:**

  - •

    Before: **dnf history \<transaction ID\>** Now: **dnf history info \<transaction ID\>**

  - •

    Before: **dnf updateinfo** Now: **dnf updateinfo summary**

### Changes to individual commands

- **alias**

  - •

    Dropped. The command has been replaced by a different functionality.

  - •

    See the Aliases for command line arguments \<#aliases-misc-ref-label\> for more information.

- **automatic**

  - •

    Now a DNF5 plugin.

  - •

    The specific systemd units, **dnf-automatic-download**, **dnf-automatic-install**, and **dnf-automatic-notifyonly**, have been dropped. Only one **dnf5-automatic** timer is shipped.

  - •

    The **emitters.send\_error\_messages** config option has been dropped. DNF5 automatic always informs the user about failed operations using configured emitters.

  - •

    See the Automatic command \<#automatic-plugin-ref-label\> for more information.

- **autoremove**

  - •

    Dropped the **\<spec\>** positional argument since the use case is sufficiently covered by the **remove** command.

  - •

    Specific variants of the command, **autoremove-n**, **autoremove-na**, and **autoremove-nevra**, are not supported anymore.

- **builddep**

  - •

    The **--spec** and **--srpm** options only apply to arguments that follow them. This allows for use cases that combine spec files and source RPMs (e.g., **dnf5 builddep --spec pkg1.spec.in --srpm pkg2.src.rpm**). However, the previously supported syntax **dnf builddep pkg1.spec.in --spec** no longer has any effect.

- **config-manager**

  - •

    New behavior introduced.

  - •

    Parameters are replaced by subcommands.

    - •

      Examples:

      - •

        Before: **--add-repo** Now: **addrepo**

      - •

        Before: **--save --setopt** Now: **setopt**

  - •

    Existing repository files are not modified; drop-in override files are created instead.

  - •

    Dropped the **--dump** option:

    - •

      To dump main configuration options use **dnf5 --dump-main-config** command.

    - •

      To dump a repository configuration use **dnf5 --dump-repo-config=REPO\_ID** command.

  - •

    Dropped the **--dump-variables** option, use **dnf5 --dump-variables** command instead.

  - •

    See the config-manager documentation \<#config-manager-plugin-ref-label\> for more information.

- **debuginfo-install**

  - •

    Now does not support *autoupdate* functionality. The permanent enablement of debug repositories can be achieved using *config-manager* command.

- **distro-sync**

  - •

    Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the **--skip-unavailable** option.

  - •

    Dropped **distrosync** and **distribution-synchronization** aliases.

- **downgrade**

  - •

    Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the **--skip-unavailable** option.

- **download**

  - •

    Option **--source** was renamed to **--srpm**.

  - •

    Dropped **--downloaddir** argument, only **--destdir** is supported now.

- **group**

  - •

    New option **--contains-pkgs** to filter only groups containing specific packages.

  - •

    Dropped **--ids** argument as group ids are always in the output now.

  - •

    Dropped **group mark install** and **group mark remove** subcommands in favor of the new **--no-packages** option for the **install** and **remove** commands.

    - •

      E.g. to mark a group as installed without touching any packages, **dnf5 group install --no-packages \<group\_id\>** command can be used.

  - •

    Dropped **groupinstall** alias. It is replaced by **dnf group install**.

  - •

    Dropped **groupinfo** alias. It is replaced by **dnf group info**.

  - •

    Dropped **grouplist** alias. It is replaced by **dnf group list**.

  - •

    Dropped **grouperase** alias. It is replaced by **dnf group remove**.

  - •

    Dropped **groupremove** alias. It is replaced by **dnf group remove**.

  - •

    Dropped **groupupdate** alias. It is replaced by **dnf group upgrade**.

  - •

    Dropped **groups** alias. It is replaced by **dnf group**.

- **help**

  - •

    Dropped. The functionality is replaced by the **--help** option.

- **history**

  - •

    Subcommands are now mandatory: **dnf history** has to be now **dnf5 history list**.

  - •

    The **history** commands now only accept transaction ID arguments; to filter by packages, use the **--contains-pkgs=PACKAGE\_NAME,...** option, available for **list** and **info**.

  - •

    **undo** subcommand now accepts **--ignore-extras** and **--ignore-installed** like original **history replay** command.

  - •

    **userinstalled** subcommand was dropped. It is replaced by **dnf repoquery --userinstalled**.

  - •

    **store** subcommand now creates a directory with transaction JSON file instead of a single transaction JSON file directly.

  - •

    **store** subcommand's **--output** option now accepts a directory path instead of a file. The default is **./transaction**.

  - •

    **replay** subcommand was moved to a standalone **replay** command, that now accepts a path to a directory instead of a file path. The directory can be created with **--store** option and in addition to the JSON transaction, it can contain packages, group and environments used in the transaction.

  - •

    **info** subcommand now prints a separate section for each selected transaction. It no longer merges all selected transactions into a single transaction section.

- **info**

  - •

    Dropped **--all** option since this behavior is the default one.

  - •

    Dropped **--updates** option, only **--upgrades** is available now.

- **install**

  - •

    Dropped **install-n**, **install-na** and **install-nevra** command variants.

- **list**

  - •

    Dropped **--all** option since this behavior is the default one.

  - •

    Changed the behavior of the **--available** option.

    - •

      In DNF4, only packages not installed or with higher versions were listed. This behavior remains unchanged when the option is not used, reducing duplications in the "Installed Packages" section.

    - •

      When using the **--available** option, DNF5 considers all versions available in enabled repositories, irrespective of the installed version.

  - •

    For installed packages print from which repository was the package installed and if the information is not available print **\<unknown\>**. This differs to DNF4 which if the information wasn't available printed **@System**.

- **makecache**

  - •

    Metadata is now stored in different directories, see the **cachedir** configuration option changes for more details.

  - •

    The **--timer** option has been dropped in favor of the systemd **OnUnitInactiveSec** setting in **dnf5-makecache.timer** and the **ConditionACPower** setting in **dnf5-makecache.service**.

  - •

    Now tries to avoid downloading whenever possible (e.g. when the local metadata hasn't expired yet or when the metadata timestamp hasn't changed). Pass **--refresh** to force refreshing of metadata. This was the intended behavior in DNF4 also, but **dnf4 makecache** always refreshed repositories due to a bug \<https://github.com/rpm-software-management/dnf/issues/2242\>.

- **mark**

  - •

    Renaming subcommands to be more intuitive: **install** -\> **user**, **remove** -\> **dependency**.

  - •

    New **weak** subcommand to mark a package as a weak dependency.

  - •

    Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the **--skip-unavailable** option.

- **module**

  - •

    Dropped **--all** option since this behavior is the default one.

- **needs-restarting**

  - •

    Command no longer scans for open files to determine outdated files still in use. The default behavior now aligns with DNF 4's **--reboothint**, suggesting a system reboot depending on updated packages since the last boot.

  - •

    Reboot recommendations are now triggered if any package with a **reboot\_suggested** advisory has been installed or updated.

  - •

    The **-s, --services** option no longer scans for open files. Instead, restarting a service is recommended if any dependency of the service-providing package or the package itself has been updated since the service started.

  - •

    Dropped **-r, --reboothint** option since this behavior is now the default one.

  - •

    Dropped **-u, --useronly** option.

- **offline-distrosync**

  - •

    Now it's an alias of **dnf5 distro-sync --offline**.

- **offline-upgrade**

  - •

    Now it's an alias of **dnf5 upgrade --offline**.

- **remove**

  - •

    Command no longer removes packages according to provides, but only based on NEVRA or file provide match.

  - •

    Dropped commands **remove-n**, **remove-na**, **remove-nevra**.

  - •

    Specific variants of the command, **remove-n**, **remove-na**, and **remove-nevra**, are not supported anymore.

    - •

      Dropped also the related aliases, **erase**, **erase-n**, **erase-na** and **erase-nevra**.

- **repoclosure**

  - •

    Dropped **--pkg** option. Positional arguments can now be used to specify packages to check closure for.

- **repository-packages**

  - •

    Dropped. The functionality is covered by existing commands combined with the **--repo**, **--disable-repo** global options and the new **--from-repo** and **--installed-from-repo** options.

  - •

    Subcommand equivalents (replace **\<REPO\_ID\>** with the actual repository ID):

    - •

      Before: **dnf repository-packages \<REPO\_ID\> check-update \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> check-upgrade \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> info \[--all\] \[\<package-spec\>...\]**

      The behavior is not fully replicated in DNF5. Two commands produce a similar result: **dnf5 info --installed-from-repo=\<REPO\_ID\> \[\<package-spec\>...\]** lists installed packages from **\<REPO\_ID\>**. Then **dnf5 --repo=\<REPO\_ID\> info --available \[\<package-spec\>...\]** lists packages available in **\<REPO\_ID\>**.

      Note: In DNF4, **--available** excluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> info --available \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> info --available \[\<package-spec\>...\]**

      Note: In DNF4, **--available** excluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> info --extras \[\<package-spec\>...\]**

      Now: **dnf5 repoquery --info --installed-from-repo=\<REPO\_ID\> --extras \[\<package-spec\>...\]**

      Note: DNF5 **info** does not support combining **--installed-from-repo** with **--extras**; **repoquery --info** is used instead.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> info --installed \[\<package-spec\>...\]**

      Now: **dnf5 info --installed-from-repo=\<REPO\_ID\> \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> info --obsoletes \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> info --obsoletes \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> info --recent \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> info --recent \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> info --upgrades \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> info --upgrades \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> install**

      Now: **dnf5 install --from-repo=\<REPO\_ID\> '\*'**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> install \<package-spec\>...**

      Now: **dnf5 install --from-repo=\<REPO\_ID\> \<package-spec\>...**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> list \[--all\] \[\<package-spec\>...\]**

      The behavior is not fully replicated in DNF5. Two commands produce a similar result: **dnf5 list --installed-from-repo=\<REPO\_ID\> \[\<package-spec\>...\]** lists installed packages from **\<REPO\_ID\>**. Then **dnf5 --repo=\<REPO\_ID\> list --available \[\<package-spec\>...\]** lists packages available in **\<REPO\_ID\>**.

      Note: In DNF4, **--available** excluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> list --available \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> list --available \[\<package-spec\>...\]**

      Note: In DNF4, **--available** excluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> list --extras \[\<package-spec\>...\]**

      Now: **dnf5 repoquery --installed-from-repo=\<REPO\_ID\> --extras \[\<package-spec\>...\]**

      Note: DNF5 **list** does not support combining **--installed-from-repo** with **--extras**; **repoquery** is used instead.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> list --installed \[\<package-spec\>...\]**

      Now: **dnf5 list --installed-from-repo=\<REPO\_ID\> \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> list --obsoletes \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> list --obsoletes \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> list --recent \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> list --recent \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> list --upgrades \[\<package-spec\>...\]**

      Now: **dnf5 --repo=\<REPO\_ID\> list --upgrades \[\<package-spec\>...\]**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> move-to**

      Now: **dnf5 reinstall --from-repo=\<REPO\_ID\> '\*'**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> move-to \<package-spec\>...**

      Now: **dnf5 reinstall --from-repo=\<REPO\_ID\> \<package-spec\>...**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> reinstall**

      There is no direct DNF5 equivalent. Try **dnf5 reinstall --installed-from-repo=\<REPO\_ID\> --from-repo=\<REPO\_ID\> '\*'** first. If that fails, fall back to **dnf5 reinstall --from-repo=\<REPO\_ID\> '\*'**.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> reinstall \<package-spec\>...**

      There is no direct DNF5 equivalent. Try **dnf5 reinstall --installed-from-repo=\<REPO\_ID\> --from-repo=\<REPO\_ID\> \<package-spec\>...** first. If that fails, fall back to **dnf5 reinstall --from-repo=\<REPO\_ID\> \<package-spec\>...**.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> reinstall-old**

      Now: **dnf5 reinstall --installed-from-repo=\<REPO\_ID\> --from-repo=\<REPO\_ID\> '\*'**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> reinstall-old \<package-spec\>...**

      Now: **dnf5 reinstall --installed-from-repo=\<REPO\_ID\> --from-repo=\<REPO\_ID\> \<package-spec\>...**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> remove**

      Now: **dnf5 remove --installed-from-repo=\<REPO\_ID\> '\*'**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> remove \<package-spec\>...**

      Now: **dnf5 remove --installed-from-repo=\<REPO\_ID\> \<package-spec\>...**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> remove-or-distro-sync**

      There is no direct DNF5 equivalent. Two commands can be used to achieve the same result: **dnf5 --disable-repo=\<REPO\_ID\> distro-sync --installed-from-repo=\<REPO\_ID\>** synchronizes packages installed from **\<REPO\_ID\>** using another enabled repository. Then **dnf5 remove --installed-from-repo=\<REPO\_ID\> '\*'** removes the packages that were not found in another enabled repository and thus are still installed from **\<REPO\_ID\>**.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> remove-or-distro-sync \<package-spec\>...**

      There is no direct DNF5 equivalent. Two commands can be used to achieve the same result: **dnf5 --disable-repo=\<REPO\_ID\> distro-sync --installed-from-repo=\<REPO\_ID\> \<package-spec\>...** synchronizes packages installed from **\<REPO\_ID\>** using another enabled repository. Then **dnf5 remove --installed-from-repo=\<REPO\_ID\> \<package-spec\>...** removes the packages that were not found in another enabled repository and thus are still installed from **\<REPO\_ID\>**.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> remove-or-reinstall**

      There is no direct DNF5 equivalent. Two commands can be used to achieve the same result: **dnf5 --disable-repo=\<REPO\_ID\> reinstall --installed-from-repo=\<REPO\_ID\> --skip-unavailable '\*'** reinstalls packages installed from **\<REPO\_ID\>** using another enabled repository. Then **dnf5 remove --installed-from-repo=\<REPO\_ID\> '\*'** removes the packages that were not found in another enabled repository and thus are still installed from **\<REPO\_ID\>**.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> remove-or-reinstall \<package-spec\>...**

      There is no direct DNF5 equivalent. Two commands can be used to achieve the same result: **dnf5 --disable-repo=\<REPO\_ID\> reinstall --installed-from-repo=\<REPO\_ID\> --skip-unavailable \<package-spec\>...** reinstalls packages installed from **\<REPO\_ID\>** using another enabled repository. Then **dnf5 remove --installed-from-repo=\<REPO\_ID\> \<package-spec\>...** removes the packages that were not found in another enabled repository and thus are still installed from **\<REPO\_ID\>**.

    - •

      Before: **dnf repository-packages \<REPO\_ID\> upgrade** (**upgrade-to** is an alias)

      Now: **dnf5 upgrade --from-repo=\<REPO\_ID\> '\*'**

    - •

      Before: **dnf repository-packages \<REPO\_ID\> upgrade \<package-spec\>...**

      Now: **dnf5 upgrade --from-repo=\<REPO\_ID\> \<package-spec\>...**

- **reposync**

  - •

    Dropped **--downloadcomps** option. Consider using **--download-metadata** option which downloads all available repository metadata, not only comps groups.

- **repolist**

  - •

    The **repolist** and **repoinfo** commands are now subcommands of the **repo** command: **repo list** and **repo info**.

    - •

      Original commands still exist as compatibility aliases.

  - •

    Options **-v** and **--verbose** have been removed. The functionality is replaced by the **repo info** command (already in DNF4 as **repoinfo**).

  - •

    When no repositories are configured, empty output is now provided instead of displaying "No repositories available".

- **repoquery**

  - •

    Dropped: **-a/--all**, **--alldeps**, **--nevra** options. Their behavior is and has been the default for both DNF4 and DNF5, so the options are no longer needed.

  - •

    Dropped: **--envra** and **--nvr** options. They are no longer supported.

  - •

    Dropped: **--unsatisfied** option. Users are ecouraged to use **dnf check --dependencies** instead.

  - •

    Dropped: **repoquery-n**, **repoquery-na** and **repoquery-nevra** command variants.

  - •

    Dropped: **--archlist** alias for **--arch**.

  - •

    Dropped: **-f** alias for **--file**. Also, the arguments to **--file** are separated by commas instead of spaces.

  - •

    Moved **--groupmember** option to the **info** and **list** subcommands of the **group** and **advisory** commands, renaming it to **--contains-pkgs**.

  - •

    **--queryformat, --qf** no longer prints an additional newline at the end of each formatted string, bringing it closer to the behavior of **rpm --query**. To get the newline, use an explicit **\\n** sequence in the formatting string.

  - •

    **--queryformat** no longer supports **size** tag because it was printing install size for installed packages and download size for not-installed packages, which could be confusing.

  - •

    Option **--source** was renamed to **--sourcerpm**, and it now matches queryformat's **sourcerpm** tag.

  - •

    Option **--resolve** was changed to **--providers-of=PACKAGE\_ATTRIBUTE**. It no longer interacts with the formatting options such as **--requires**, **--provides**, **--suggests**, etc. Instead, it takes the PACKAGE\_ATTRIBUTE value directly.

    - •

      For example, **dnf rq --resolve --requires glibc** is now **dnf rq --providers-of=requires glibc**.

  - •

    See the Repoquery command \<#repoquery-command-ref-label\> for more information.

- **shell**

  - •

    The **shell** command has been superseded by the new **do** command.

    - •

      The main advantage of the old command was its ability to perform multiple actions within a single transaction. The new **do** command retains this core functionality, but with a different usage model.

      - •

        Usage: The **shell** command allowed actions to be entered via an interactive shell or a redirected file. The new **do** command, however, requires actions to be provided as command-line arguments. Direct support for reading a command file is not available at this time. However, the file's contents can be passed as arguments on the command line (e.g., **dnf do $(cat file)**).

- **system-upgrade**

  - •

    Moved from a plugin to a built-in command.

- **upgrade**

  - •

    New option **--minimal**.

    - •

      **upgrade-minimal** still exists as a compatibility alias for **upgrade --minimal**.

  - •

    Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the **--skip-unavailable** option.

  - •

    Dropped **upgrade-to** and **localupdate** aliases.

  - •

    Dropped **--skip-broken** option, as it was already available in DNF4 only for compatibility reasons with YUM, but has no effect.

    - •

      Instead, decisions about package selection and handling dependency issues are based on the best \<#best-option-ref-label\> or no-best \<#no-best-option-ref-label\> options.

- **updateinfo**

  - •

    Renamed the command to **advisory**

    - •

      **updateinfo** still exists as a compatibility alias.

  - •

    Subcommands are now mandatory: **dnf updateinfo** is now **dnf5 advisory summary**.

  - •

    Options **--summary**, **--list** and **--info** have been changed to subcommands. See **dnf5 advisory --help**.

  - •

    Option **--sec-severity** has been renamed to **--advisory-severities=ADVISORY\_SEVERITY,...**.

  - •

    The **advisory** commands now only accept advisory IDs; to filter by packages, use the **--contains-pkgs=PACKAGE\_NAME,...** option.

  - •

    Dropped deprecated aliases: **list-updateinfo**, **list-security**, **list-sec**, **info-updateinfo**, **info-security**, **info-sec**, **summary-updateinfo**.

  - •

    Dropped **upif** alias.

- **versionlock**

  - •

    New format of the configuration file.

  - •

    See the Versionlock command \<#versionlock-command-ref-label\> for more information.

## CHANGES ON THE API

The differences between DNF4 and DNF5 API are not only in minor tweaks, but there are major architectural changes, therefore, it is not feasible to cover all the changes. The Tutorial: API changes between DNF and DNF5 \<#tutorial-api-changes-ref-label\> section describes the most common use cases and points out the main differences.

### Other notable changes on the API

- **PackageSet::operator\[\]**

  - •

    It was removed due to insufficient O(n^2) performance. Use PackageSet iterator to access the data instead.

- **Package::get\_epoch()**

  - •

    The return type was changed from **unsigned long** to **std::string**.

- **DNF: Package.size, libdnf: dnf\_package\_get\_size()**

  - •

    The return value was ambiguous, returning either package or install size. Use Package::get\_download\_size() and Package::get\_install\_size() instead.

- **dnf\_sack\_set\_installonly, dnf\_sack\_get\_installonly, dnf\_sack\_set\_installonly\_limit, dnf\_sack\_get\_installonly\_limit**

  - •

    The functions were dropped as unneeded. The installonly packages are taken directly from main Conf in Base.

- **Query::filter() - HY\_PKG\_UPGRADES\_BY\_PRIORITY, HY\_PKG\_OBSOLETES\_BY\_PRIORITY, HY\_PKG\_LATEST\_PER\_ARCH\_BY\_PRIORITY**

  - •

    The priority filter was separated into a standalone method. Combine **query.filter\_priority()** with **query.filter\_latest\_evr()** or another filter to achieve the original functionality.

- **Query::filter() - HY\_PKG\_LATEST**

  - •

    The filter was replaced with **filter\_latest\_evr()** which has the same behavior as **HY\_PKG\_LATEST\_PER\_ARCH**

- **ConfigMain::proxy\_auth\_method() and ConfigRepo::proxy\_auth\_method()**

  - •

    The return types were changed. **OptionEnum\<std::string\>** was replaced by **OptionStringSet**. A combination of several authentication methods (for example "basic" and "digest") can now be used. This allows using a list of authentication methods in configuration files and the DNF5 command line "--setopt=proxy\_auth\_method=".

## CHANGES TO CONFIGURATION

### Deprecation of the strict option

**strict** configuration option is now deprecated due to its dual functionality:

- 1\.

  It allows the solver to skip uninstallable packages to resolve dependency problems.

- 2\.

  It permits DNF to skip unavailable packages (mostly for the **install** command).

To address this, the functionality has been split into two configuration options:

- •

  **skip\_broken** for uninstallable packages.

- •

  **skip\_unavailable** for packages not present in repositories.

Additionally, corresponding command-line options **--skip-broken** and **--skip-unavailable** have been introduced for commands where applicable.

### Deprecation of the metadata\_timer\_sync option

The **metadata\_timer\_sync** configuration option is now obsoleted by the **dnf5-makecache.timer** systemd timer settings.

### Deprecation of the retries option

The **retries** configuration option is now deprecated. In dnf4, despite being documented as the number of retries for downloading packages, it was only used to limit the number of package re-downloads due to deltarpm errors. Deltarpm support is currently not planned for DNF5.

### Deprecation of the deltarpm and deltarpm\_percentage options

Support for delta RPMs is not planned for DNF5.

### Changes to individual options

- **best**

  - •

    Default value is changed to **true**.

  - •

    The new default value ensures that important updates will not be skipped and issues in distribution will be reported earlier.

- **cachedir**

  - •

    The default user cached dir is now at **~/.cache/libdnf5**.

  - •

    The default root cache directory, configured by the **system\_cachedir** option, is now **/var/cache/libdnf5**.

  - •

    Users no longer access the root's cache directly; instead, metadata is copied to the user's location if it's empty or invalid.

  - •

    For additional information, refer to the Caching \<#caching-misc-ref-label\> man page.

- **cacheonly**

  - •

    The option was changed from **bool** to **enum** with options **all**, **metadata** and **none**.

    - •

      This enables users to specify whether to use the cache exclusively for metadata or for both metadata and packages.

- **disable\_excludes**

  - •

    To disable all configuration file excludes, the **\*** glob character is used now instead of the **all** to unify the behavior with query objects on the API.

- **keepcache**

  - •

    The behavior has been slightly modified, see the Caching \<#caching-packages-ref-label\> man page for more information.

- **optional\_metadata\_types**

  - •

    Default value is now: **comps,updateinfo**.

  - •

    Supported values are now extended to the following list: **comps**, **filelists**, **other**, **presto**, **updateinfo**.

### Newly introduced configuration options

- **allow\_downgrade**

  - •

    New option used to enable or disable downgrade of dependencies when resolving transaction.

- **skip\_broken, skip\_unavailable, strict**

  - •

    New options **skip\_broken**, **skip\_unavailable** were added due to deprecation of **strict** option.

  - •

    See the strict deprecation above.

### Dropped configuration options

- **arch and basearch**

  - •

    It is no longer possible to change the detected architecute in configuration files.

  - •

    See the **[dnf5-forcearch(7)](/dnf5-forcearch/7.md)**, Forcearch parameter \<#forcearch-misc-ref-label\> for overriding architecture.

- **errorlevel**

  - •

    The option was deprecated in dnf \< 5 and is dropped now.

## Author

See AUTHORS.md in dnf5 source distribution.

## Copyright

Contributors to the dnf5 project.
