How To Install debtree on Ubuntu 22.04

In this tutorial we learn how to install debtree on Ubuntu 22.04. debtree is package dependency graphs on steroids

Introduction

In this tutorial we learn how to install debtree on Ubuntu 22.04.

What is debtree

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.

There are three methods to install debtree on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install debtree Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install debtree using apt-get by running the following command:

sudo apt-get -y install debtree

Install debtree Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install debtree using apt by running the following command:

sudo apt -y install debtree

Install debtree Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install debtree using aptitude by running the following command:

sudo aptitude -y install debtree

How To Uninstall debtree on Ubuntu 22.04

To uninstall only the debtree package we can use the following command:

sudo apt-get remove debtree

Uninstall debtree And Its Dependencies

To uninstall debtree and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove debtree

Remove debtree Configurations and Data

To remove debtree configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge debtree

Remove debtree configuration, data, and all of its dependencies

We can use the following command to remove debtree configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge debtree

References

Summary

In this tutorial we learn how to install debtree package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.