LinuxCommandLibrary

dnf-deplist

List package dependencies

TLDR

View documentation for the original command

$ tldr dnf repoquery
copy

SYNOPSIS

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

PARAMETERS

--resolve
    Instead of listing dependencies, show the packages that resolve (provide) them, revealing the full dependency tree.

--all, -a
    Display all dependencies, including those satisfied by the package itself.

--development
    Show only (build-)development dependencies.

--extras
    Show only extra (unused) dependencies.

--installed
    Consider only installed packages for providers.

--installed-only
    Ignore available (repo) packages; use only installed ones.

DESCRIPTION

The dnf deplist command, provided by the DNF plugins core, analyzes specified packages and lists their runtime dependencies along with the installed packages that provide them. This helps users understand dependency resolution, identify why packages were pulled in during installation, and troubleshoot issues like orphaned dependencies or disk space usage.

Output is structured hierarchically: the target package is shown first, followed by its dependencies grouped by provider packages. Unsatisfied dependencies (those not provided by any installed package) appear at the top. Each dependency line indicates the providing package(s) with indentation for clarity.

For example, running dnf deplist vim-enhanced might reveal deps like libselinux.so.1 provided by libselinux, helping trace installation chains. This is invaluable for system administrators maintaining minimal installs or auditing package trees.

The command integrates seamlessly with DNF's query system, supporting globs and file specs for packages. It considers both installed and available packages unless restricted.

CAVEATS

Requires dnf-plugins-core package installed. Only works on DNF-based systems (Fedora, RHEL 8+). Does not handle auto-generated deps perfectly; output can be verbose for complex packages.

INSTALLATION

Install via sudo dnf install dnf-plugins-core.

EXAMPLE OUTPUT

dnf deplist bash
bash
libtinfo.so.6()(64bit)
ncurses-libs-6.1-7.20180224.fc29.x86_64

HISTORY

Introduced in dnf-plugins-core version 4.0.0 (2018) as successor to yum-deplist from YUM era. Evolved with DNF adoption in Fedora 22 (2015) and RHEL 8, enhancing dependency visualization for modern RPM ecosystems.

SEE ALSO

dnf(8), rpm(8), dnf history(1), repoquery(1)

Copied to clipboard