---
name: "dnf5-filtering"
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-filtering"
---

# dnf5-filtering(7)

Packages Filtering

## NAME

dnf5-filtering - Packages Filtering

## DESCRIPTION

Package filtering removes packages from the available package set, making them invisible to most **DNF5** commands. As a result, these packages cannot be included in any transaction.

There are several ways a package can be filtered out:

## GLOBAL EXCLUDES FILTERING

Exclude filtering can be adjusted using the **includepkgs** or **excludepkgs** configuration options in the DNF5 configuration file. To disable excludes, you can use the **disable\_excludes** configuration option:

**dnf5 --setopt=disable\_excludes=\* install bash**

For details about the configuration options see **[dnf5.conf(5)](/dnf5.conf/5.md)**, DNF5 configuration reference \<#dnf5-conf-label\>.

## REPOSITORY EXCLUDES FILTERING

Similar to global excludes, but this configuration is repository-specific and only affects packages within the repository where the excludes are set.

## USER EXCLUDES FILTERING

API users have an additional option how to fine-tune excluded packages using **\*\_user\_excludes()** and **\*\_user\_includes** methods of the **PackageSack** object. See **libdnf5::rpm::libdnf5::rpm::PackageSack**.

## VERSIONLOCK

Additionally, the versionlock functionality is implemented using excludes filtering. However, these excludes are applied only during transactional operations. For details see **[dnf5-versionlock(8)](/dnf5-versionlock/8.md)**, Versionlock command \<#versionlock-command-ref-label\>.

## MODULAR FILTERING

For details on how modular filtering works please see **[dnf5-modularity(7)](/dnf5-modularity/7.md)**, the modularity documentation \<#modularity-misc-ref-label\>.

With modularity, only RPM packages from **active** module streams are included in the available package set. RPM packages from **inactive** module streams, as well as non-modular packages with the same name or provides as a package from an **active** module stream, are filtered out. Modular filtering is not applied to packages added from the command line, installed packages, or packages from repositories with **module\_hotfixes=true** in their **.repo** file.

Disabling of modular filtering is not recommended, because it could cause the system to get into a broken state. To disable modular filtering for a particular repository, specify **module\_hotfixes=true** in the **.repo** file or use **--setopt=\<repo\_id\>.module\_hotfixes=true**.

## Author

See AUTHORS.md in dnf5 source distribution.

## Copyright

Contributors to the dnf5 project.
