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
Sponsored
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.

Sponsored
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

Canonical announces 12 year Kubernetes LTS

Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…

21 hours ago

Ubuntu Weekly Newsletter Issue 878

Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…

2 days ago

How your feedback shapes the way we support open source software

At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…

2 days ago

How To Install osTicket v1.14 On Ubuntu 20.04

I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…

3 days ago

How To Install WordPress On Ubuntu 20.04

Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…

3 days ago

How To Install DNS Server (Bind9) On Ubuntu 20.04

Now I want to share the DNS server installation process on your Ubuntu 20.04 server.…

3 days ago