pactree: command not found

“pactree” is a tool in Arch Linux that allows users to view the dependencies of packages installed on their system. The tool displays the dependencies of a package in the form of a tree, showing the parent package and all the packages that it depends on. This provides a visual representation of the relationships between packages, making it easier to understand the dependencies of a package and to see what packages are needed in order to install a particular package.

“pactree” can be used to list the dependencies of a single package, or to display the complete dependency tree of all installed packages. This information can be useful for troubleshooting problems with the system, for example, if a package is missing a required dependency, or if a package is causing a conflict with another package. “pactree” can also be used to evaluate the impact of installing or removing a package, by showing the packages that would be affected.

If you encounter the below error while running the command pactree:

pactree: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install pacman
Ubuntu apt-get install pacman
Alpine apk add pacman
Arch Linux pacman -S pacman-contrib
Kali Linux apt-get install pacman
Fedora dnf install pacman
Raspbian apt-get install pacman

pactree Command Examples

1. Print the dependency tree of a specific package:

# pactree package

2. Print what packages depend on a specific package:

# pactree --reverse package

3. Dump dependencies one per line, skipping duplicates:

# pactree --unique package

4. Include optional dependencies of a specific package and colorize the output:

# pactree --optional --color package

5. Display help:

# pactree
Related Post