How to check .deb Package Dependencies in Ubuntu

Most software or application in Ubuntu, does not come as one package and it depends on other packages to work as intended. These supporting packages are called dependency packages as they are required for the proper working of the software. Usually, the package manager in your system automatically resolves these dependencies, but sometimes an issue or error occurs and you have to resolve the issue manually.

In that case, it is better to have a detailed picture of the dependencies of the package so that you can locate the issue easily. Therefore, You will learn how to check the dependencies of any package in this article.

Check Dependencies Using APT Package Manager

You can use the apt package manager depends command to list down the dependencies associated with any particular package. For example, run the following command to see the dependencies of the vlc package.

sudo apt depends vlc

You can also use the following apt-cache command to get a similar result.

sudo apt-cache depends vlc

If you want more detailed information about package dependencies, run the following apt show command.

sudo apt show vlc

Similarly, you can use the apt-cache show command to get more comprehensive information about package dependencies.

sudo apt-cache show vlc

Check Dependencies Using Debian Package Manager (dpkg)

If you have to install any software from a deb file, you can check its dependencies by running one of the following commands.

sudo dpkg -I /path/to/package.deb
sudo dpkg --info /path/to/package.deb

Note: Replace /path/to/package with your deb file path before running the above command.

The above commands will show the dependencies even before the .deb package is installed. But if you want to check the dependencies of an already installed package, run the following command with your package name.

sudo dpkg -s firefox

Check Dependencies Using apt-rdepends Utility

apt-rdepends is a utility that can help you list down the package dependencies. You can install it by using the following command.

sudo apt install apt-rdepends

To see the dependencies tree, run the following command with your package name.

sudo apt-rdepends packagename

You can also get information about packages that are dependent on a particular package with the following command.

sudo apt-rdepends -r vlc-bin

Check Dependencies Using reverse-depends Utility

Reverse-depends is a utility that provides information about the dependent packages. You can install it by running the following command.

sudo apt install ubuntu-dev-tools

To list down the direct dependencies of the package, run the following command with your package name.

sudo reverse-depends -R vlc

Check Dependencies Using Simulated Installation/Uninstallation

You can use the -s option with the apt command to simulate the installation and uninstallation of any package to see the dependencies installed during the installation.

sudo apt install -s vlc

sudo apt remove -s php

Conclusion

Ubuntu/Linux packages are interdependent as they are designed to complete a single task. This article shows how you can see the package dependencies.

It is beneficial to know what packages are required or are being installed during software installation as it gives you more clarity over the installation process. It also helps you debug your installation process in case of an error.

The post How to check .deb Package Dependencies in Ubuntu appeared first on FAQforge.

Ubuntu Server Admin

Recent Posts

Advantech AOM-2721 is now Ubuntu Certified

Canonical announces that the Advantech AOM-2721 is officially joining the list of Ubuntu Certified Hardware.…

7 hours ago

Ruby and Rails Performance Roundup: The Backlog Edition

Yet again instead of tweets, a blog post. The backlog got out of hand -…

7 hours ago

How to Deploy OpenProject on Ubuntu VPS

This article provides a guide demonstrating how to deploy OpenProject on Ubuntu VPS. What is…

8 hours ago

Canonical integrates NVIDIA Nemotron 3.5 Lightning with Ubuntu for always-on AI agents

Canonical is pleased to announce that  NVIDIA’s newly introduced NVIDIA Nemotron 3.5 Lightning, an open,…

2 days ago

Xfwl4’s Second Preview Release

I’m pleased to announce the second preview release of xfwl4, Xfce’s Wayland compositor, version 4.21.1.…

2 days ago

How to Install, Secure, and Set Up MySQL on Ubuntu 26.04 LTS

If you have been using an ecommerce store to place online orders or have been…

3 days ago