LinuxCommandLibrary

dnf-deplist

List package dependencies

TLDR

View documentation for the original command

$ tldr dnf repoquery
copy

SYNOPSIS

dnf deplist [options] <package-specifier>...

PARAMETERS

package-specifier
    Required. The name or glob pattern of the package(s) for which to list dependencies. Examples: httpd, kernel\*.

--all
    Show all types of dependencies (requires, recommends, suggests, enhances, supplements, conflicts, obsoletes, provides). By default, only runtime requirements are shown.

--arch
    Filter dependencies by a specific architecture, such as x86_64 or i686.

--conflicts
    Show packages that conflict with the specified package.

--enhances
    Show packages that this package enhances.

--obsoletes
    Show packages that this package obsoletes.

--provides
    Show what capabilities the package itself provides (not its dependencies). Useful for seeing what virtual provides a package offers.

--recommends
    Show recommended packages. These are not strictly required but provide enhanced functionality.

--repo
    Limit the dependency search to a specific repository ID. Can be used multiple times. Example: --repo epel --repo updates.

--requires
    Show required packages. This is the default behavior if no other dependency type option is specified.

--srpm
    Show dependencies of the source RPM (SRPM) for the specified package. Useful for build environments.

--suggests
    Show suggested packages. These are even weaker dependencies than recommendations.

--supplements
    Show packages that supplement this package.

--verbose
    Provide more detailed output, including full N-E-V-R-A (Name-Epoch-Version-Release-Architecture) of packages and more explicit dependency types.

DESCRIPTION

The `dnf-deplist` command is a powerful utility within the DNF package manager ecosystem, designed to provide comprehensive information about the dependencies of specified RPM packages. It queries the enabled DNF repositories to identify not just direct requirements but also indirect dependencies, conflicts, and other related package relationships. This tool is invaluable for system administrators, developers, and users who need to understand why a particular package is needed, what other packages it relies upon, or what capabilities it provides.

Unlike `rpm -qR`, which only shows direct runtime requirements from the RPM header, `dnf-deplist` performs a deeper analysis using the DNF solver, taking into account the available packages in your configured repositories. It can show different types of dependencies, such as runtime requirements, build requirements, weak dependencies (like recommendations and suggestions), and even packages that conflict or are obsoleted. Its output helps in troubleshooting installation issues, building packages from source, or simply gaining a clearer picture of your system's package interconnections.

CAVEATS

  • The command relies on the metadata from your currently enabled DNF repositories. If a required repository is not enabled, dependencies from that repository may not be resolved or listed.
  • The output can be extensive, especially for packages with many dependencies or when using the `--all` or `--verbose` options. Piping the output to tools like `less` or `grep` is often advisable for better readability.
  • `dnf-deplist` shows resolved dependencies based on the current system state and available packages, which might differ from a theoretical list of dependencies found directly in an RPM file's header if not all dependencies are met by available packages.

OUTPUT FORMAT

The output typically lists the package name, followed by the dependency requirement, the type of dependency (e.g., `requires`), and the package that provides that dependency (if found). For example, a line might look like:
`package-name requires /usr/bin/python3 provided by python3-libs-X.Y.Z.rpm`
When using `--verbose`, more detailed information about the NEVRA (Name-Epoch-Version-Release-Architecture) of the providing package is included.

COMMON USE CASES

  • Troubleshooting Missing Dependencies: Quickly identify which packages are missing or not satisfied during an installation or upgrade failure.
  • Building from Source: Understand the build-time requirements for compiling software on your system.
  • System Auditing: Gain insight into the interdependencies of installed software, which can be crucial for security audits or system hardening.
  • Package Development: Verify that package specifications correctly declare all necessary dependencies.

HISTORY

The `deplist` functionality originated in the YUM package manager, serving as a critical tool for dependency introspection. With the transition from YUM to DNF (Dandified YUM) as the default package manager in Fedora and later in RHEL/CentOS, this utility was re-implemented and integrated into DNF. While DNF introduced a new underlying resolver (`libsolv`), the purpose and core functionality of `deplist` remained consistent: to provide a clear, detailed view of package dependencies for effective system management and troubleshooting. Its continued presence highlights its importance in the Linux package management ecosystem.

SEE ALSO

dnf(8), dnf-repoquery(8), rpm(8), yum(8)

Copied to clipboard