debtree command not found

In this troubleshooting guide we learn how to fix debtree command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

debtree: command not found

or when using sudo you get the following error message

sudo: debtree: command not found

Solutions to debtree: command not found

How To Fix debtree: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu debtree is provided by debtree package.

debtree is:

Very powerful and versatile tool for generating dependency graphs showing the relationships between .deb packages.

The graph is generated in the form of a .dot file that can be used as input for the utility ‘dot’ from the graphviz package. What information is included in a graph can be varied using command line options.

Supported are: regular (forward) dependencies, reverse dependencies, showing installed packages, virtual packages, alternatives, and much more.

To fix this problem, we can install more using the command below.

sudo apt-get -y install debtree

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install debtree.

sudo apt -y install debtree

Or if you have aptitude installed you can use the following command.

sudo aptitude install debtree

Summary

In this tutorial we learn how to fix debtree command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.