.\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "DNF5-DEPTREE" "8" "Nov 15, 2026" "" "dnf5" .SH NAME dnf5-deptree \- Deptree Command .SH SYNOPSIS .sp \fBdnf5 [GLOBAL OPTIONS] deptree [OPTIONS] ...\fP .SH DESCRIPTION .sp \fBdeptree\fP displays a package dependency graph using enabled repository metadata by default. With \fB\-\-installed\fP, it uses packages from the local RPMDB instead. It does not invoke the dependency solver. .sp By default, dependencies of type \fBRequires\fP are followed. Requirements with a single provider link directly to that provider. Requirements with multiple providers are displayed below a \fBchoice:\fP node. \fBrpmlib(*)\fP requirements are ignored. Requirements with no provider are displayed as \fBunsatisfied:\fP nodes. .sp Each package subtree is expanded once across all selected roots, at an occurrence whose dependency depth is minimal from any root. Other occurrences with a subtree are marked with \fB[expanded elsewhere]\fP, even if the expansion appears later in the output or under another root. Leaf nodes are not marked. This prevents cycles and repeated subtree expansion. .sp Dependencies retain their metadata order within each requested type. Provider candidates and reverse dependents are sorted by NEVRA. Rich\-expression operands retain their expression order. .sp Package specifications accept package names, NEVRAs, and glob patterns. For an ambiguous specification without an architecture, the command selects the latest EVR for each matching architecture. Dependency providers and reverse dependents follow the same policy. \fB\-\-arch\fP limits roots and traversal to the specified architectures. Use \fB\-\-showduplicates\fP to retain all matching versions. An architecture\-qualified NEVRA is honored as written. .sp In repository mode, repository selection follows the standard global options, including \fB\-\-repo\fP, \fB\-\-enable\-repo\fP, and \fB\-\-disable\-repo\fP\&. .SH OPTIONS .INDENT 0.0 .TP .B \fB\-\-reverse\fP .nf Show packages that depend on each selected package. Reverse traversal uses the latest EVR of each package name and architecture by default. .fi .sp .TP .B \fB\-\-flat\fP .nf Print a sorted, deduplicated list of package NEVRAs instead of a tree. .fi .sp .TP .B \fB\-\-installed\fP .nf Display dependency trees for installed packages only. .fi .sp .TP .B \fB\-\-contains\-pkgs=PACKAGE_NAME,...\fP .nf Show only branches leading to packages with specified names. This is a list option; package\-name globs are supported. A matching package is retained as a leaf, along with all shortest paths from a selected root to it. Each matching package is considered separately. Dependency levels are counted as for \fB\-\-depth\fP\&. .fi .sp .TP .B \fB\-\-arch=ARCH[,ARCH...]\fP .nf Limit roots, provider candidates, and reverse dependents to the specified architectures. This option can be specified multiple times. .fi .sp .TP .B \fB\-\-depth=N\fP .nf Include packages reachable within \fBN\fP dependency levels from any selected root. \fB0\fP prints only roots. Only package nodes count toward dependency depth; choice, condition, else, requirement, and unsatisfied nodes add no depth. Shared package subtrees are expanded only at their minimum depth, keeping displayed branches within \fBN\fP package levels. .fi .sp .TP .B \fB\-\-show\-requires\fP .nf Render explicit \fBrequirement:\fP nodes between packages and their providers. This option applies only to forward traversal and conflicts with \fB\-\-reverse\fP\&. .fi .sp .TP .B \fB\-\-types=LIST\fP .nf Process the comma\-separated dependency types in \fBLIST\fP\&. Accepted values are \fBrequires\fP, \fBrecommends\fP, \fBsuggests\fP, \fBsupplements\fP, and \fBenhances\fP\&. The default is \fBrequires\fP\&. .fi .sp .TP .B \fB\-\-showduplicates\fP .nf Include every matching package EVR. Without this option, ambiguous roots and traversal candidates use the latest EVR per name/architecture. .fi .sp .TP .B \fB\-\-json\fP .nf Print machine\-readable JSON. Normal mode emits a graph with \fBroots\fP, \fBnodes\fP, and \fBedges\fP arrays. Combined with \fB\-\-flat\fP, it emits a sorted JSON array of NEVRA strings. .fi .sp .UNINDENT .SH JSON OUTPUT .sp \fBdnf5 deptree \-\-json \fP .sp Without \fB\-\-flat\fP, the command returns a graph object with these fields: .INDENT 0.0 .IP \(bu 2 \fBroots\fP (array of strings): IDs of root package nodes. .IP \(bu 2 \fBnodes\fP (array of objects): each graph node appears once. Every node has an \fBid\fP and \fBtype\fP\&. .INDENT 2.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fBpackage\fP nodes contain \fBname\fP, \fBepoch\fP, \fBversion\fP, \fBrelease\fP, and \fBarch\fP (all strings). Their IDs begin with \fBpkg:\fP\&. .IP \(bu 2 \fBchoice\fP nodes contain \fBcapability\fP (string). Their IDs begin with \fBchoice:\fP\&. .IP \(bu 2 \fBconditional\fP nodes contain \fBcondition\fP (string). Their IDs begin with \fBcond:\fP\&. .IP \(bu 2 \fBelse\fP nodes contain \fBcondition\fP (string). Their IDs begin with \fBelse:\fP\&. .IP \(bu 2 \fBrequirement\fP nodes, produced by \fB\-\-show\-requires\fP, contain \fBcapability\fP (string). Their IDs begin with \fBrequirement:\fP\&. .IP \(bu 2 \fBunsatisfied\fP nodes contain the unresolved \fBcapability\fP (string). Their IDs begin with \fBunsatisfied:\fP\&. .UNINDENT .UNINDENT .UNINDENT .IP \(bu 2 \fBedges\fP (array of objects): graph links with \fBsource\fP and \fBtarget\fP node IDs. Every edge contains \fBrequirements\fP, an array of capability strings. It is empty for graph\-structure links and provider links. .UNINDENT .sp \fBdnf5 deptree \-\-flat \-\-json \fP .sp With both \fB\-\-flat\fP and \fB\-\-json\fP, the command returns a sorted JSON array of unique package NEVRA strings. All non\-package nodes, including unsatisfied requirements, are omitted. .SH EXAMPLES .INDENT 0.0 .TP .B \fBdnf5 deptree libsolv\fP .nf Show dependencies of the newest matching \fBlibsolv\fP package builds. .fi .sp .TP .B \fBdnf5 deptree \-\-reverse dnf5\fP .nf Show packages in enabled repositories that depend on matching \fBdnf5\fP package builds. .fi .sp .TP .B \fBdnf5 deptree \-\-showduplicates \-\-depth=1 \(aqlibsolv*\(aq\fP .nf Show every matching \fBlibsolv\fP build and one dependency level. .fi .sp .TP .B \fBdnf5 deptree \-\-types=requires,recommends \-\-json bash\fP .nf Emit a JSON dependency graph that includes both hard and recommended dependencies. .fi .sp .TP .B \fBdnf5 deptree \-\-contains\-pkgs=\(aqDeepDependencyB*\(aq packageA\fP .nf Show only shortest dependency paths from \fBpackageA\fP that reach matching packages. .fi .sp .UNINDENT .SH Author See AUTHORS.md in dnf5 source distribution. .SH Copyright Contributors to the dnf5 project. .\" End of generated man page.