• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

pactree: command not found

by Deepika

“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

Filed Under: Linux

Some more articles you might also be interested in …

  1. grub-bios-setup Command Examples in Linux
  2. How to use netstat command under Linux (Examples included)
  3. How to check the PHP version on Linux
  4. id Command Examples in Linux
  5. pamac Command Examples in Linux
  6. “aws s3api” Command Examples
  7. getcap: command not found
  8. runlim Command Examples in Linux
  9. viewnior: command not found
  10. fscrypt: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright