LinuxCommandLibrary

pacman-t

Remove unrequired packages

TLDR

View documentation for the original command

$ tldr pacman deptest
copy

SYNOPSIS

pacman-t [options] <package(s)>

PARAMETERS

-r, --deptree
    Displays the packages that the specified package requires. This is the default behavior if no other tree-type option is given.

-s, --reqby
    Displays the packages that require the specified package. This shows the reverse dependency tree.

-u, --installed
    When displaying a dependency tree (--deptree), this option filters the output to show only explicitly installed packages, omitting those that are optional or merely suggested.

-l, --linear
    Shows dependencies in a simple, linear list rather than a hierarchical tree structure.

-c, --color
    Enables colorized output for better readability, highlighting different types of packages or relationships.

-d <path>, --dbpath <path>
    Specifies an alternative pacman database path to use instead of the default.

-y <path>, --sysroot <path>
    Specifies an alternative system root path for pacman operations, useful for chroot or container environments.

--indent <string>
    Defines the string used for indenting levels in the tree output (e.g., ' ' for two spaces).

-q, --quiet
    Suppresses warnings and error messages, providing a cleaner output.

-h, --help
    Displays a help message with usage information and available options.

-v, --version
    Shows the version information of the pacman-t (pactree) script.

DESCRIPTION

The command `pacman-t` (often implemented as the pactree script from the pacman-contrib package) is a powerful utility for visualizing package relationships within Arch Linux and its derivatives. It allows users to display either the dependency tree of a specified package (i.e., what packages it requires) or the reverse dependency tree (i.e., what packages depend on it). This tool is invaluable for understanding why certain packages are installed, identifying potential candidates for removal when a package is uninstalled, or troubleshooting dependency conflicts. It operates by parsing the local pacman database to construct and present these hierarchical relationships in a human-readable format, often with color-coded output for clarity.

CAVEATS

The command `pacman-t` is typically a script, most commonly provided as pactree within the pacman-contrib package. It relies on the consistency and integrity of the local pacman database. Complex or broken dependency chains might not be accurately represented, and it does not handle optional or 'make' dependencies directly in the same way as core pacman operations. Its performance can vary depending on the size of the dependency tree and system resources.

INSTALLATION

The `pacman-t` utility (as pactree) is not part of the core pacman package. It is provided by the pacman-contrib package. To install it on Arch Linux, use: pacman -S pacman-contrib.

USAGE EXAMPLES

To view the dependency tree for a package like 'firefox':
pacman-t firefox

To see which packages depend on 'zlib':
pacman-t --reqby zlib

To show only explicitly installed dependencies of 'gnome-shell':
pacman-t --deptree --installed gnome-shell

HISTORY

The `pacman-t` functionality, commonly provided by the pactree script, has been a part of the pacman-contrib tools since early in Arch Linux's development. These 'contrib' scripts emerged to provide auxiliary utilities that enhance the core pacman experience, offering advanced query and analysis capabilities not built into the main package manager executable itself. Its ongoing development focuses on improving dependency visualization and user experience.

SEE ALSO

pacman(8), pacman-Q(8), pacman-S(8), pacman-R(8)

Copied to clipboard