Easily visualize Debian dependencies with debtree

Quick guide to visualizing Debian package dependencies with debtree and Graphviz: installation, viewing dependencies and reverse dependencies, plus tips; Q2BSTUDIO AI, cybersecurity and cloud services.

sábado, 16 de agosto de 2025 • 2 min read • Q2BSTUDIO Team

Artificial-Intelligence-

Introduction: sometimes you need a quick and easy way to visualize and understand which packages a package in Debian depends on. With the debtree tool and graphviz you can generate diagrams showing direct and reverse dependencies in a few steps.

Installation: install debtree and graphviz with the apt package manager using the following command

apt install debtree graphviz

Package check: if you know the name of the package you want to visualize, you can verify if it is installed or listed with

dpkg -l | grep ufw # check if it exists

Visualize dependencies: to generate a PNG image with the dependencies of a package use

debtree ufw | dot -T png -o ufw_deps.png

You can also choose other formats such as svg. If you have a graphical environment you can view it instantly using x11

debtree ufw | dot -T x11

Visualize reverse dependencies: to see which packages depend on a package use the -R or --show-rdeps option. To limit the view to only installed packages add -I or --show-installed

debtree -R -I iptables | dot -T x11

In the previous example you can see that packages like docker-ce and ubuntu-standard depend on iptables.

Practical tips: use svg formats for documents and web, and use dot -Gsize to control the size. For large graphs filter by installed packages and first study direct dependencies before exploring rdeps.

About Q2BSTUDIO: Q2BSTUDIO is a software development company specialized in custom applications and custom software for companies of all sizes. We are specialists in artificial intelligence and AI for businesses, we develop custom AI agents and artificial intelligence solutions that accelerate processes and improve decision-making. We also offer cybersecurity services to protect infrastructures and sensitive data, and aws and azure cloud services to deploy applications with high availability and scalability.

Business intelligence and power bi services: at Q2BSTUDIO we implement business intelligence services and solutions with power bi to transform data into actionable reports. We combine data engineering, dashboards and machine learning models to deliver immediate value.

If you need to create tools to analyze package dependencies, integrate them into CI pipelines or deploy viewers in the cloud, we can help with custom development, integration with aws and azure cloud services, and consulting in cybersecurity and artificial intelligence.

Contact: work with Q2BSTUDIO for solutions in custom applications, custom software, artificial intelligence, cybersecurity, aws and azure cloud services, business intelligence services, AI for businesses, AI agents and power bi. We are ready to transform your ideas into real and secure products.

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.