Linux Mint

How to Get Dependencies of a Package on Linux Mint 21

While working with the Linux system, it mostly happens that an application requires additional packages to function correctly when installed. These packages are known as dependencies for that specific application. It might happen that they are pre-installed on the system, but if not, they install with the application automatically.

In Linux Mint 21 system, you can display these dependencies with the help of different command-line tools. This guide is about getting dependencies of a package in Linux Mint 21:

How to get Dependencies of a Package on Linux Mint 21

There are several command-line tools offered by Linux systems to show package dependencies. Let’s check one by one:

1: Check Dependencies Using apt-cache Command

The apt-cache command-line utility is used to display dependencies with limited details. Follow the mentioned syntax to use apt-cache command:

$ apt-cache depends [package_name]

Run the command on terminal to get better understanding:

$ apt-cache depends firefox

2: Check Dependencies Using showpkg Command

The showpkg command-line tool is used to print all relative dependencies whether they are installed in the system or not. Use the mentioned syntax for this command:

$ apt-cache showpkg [package_name]

For example, to get dependencies details regarding VLC, type in terminal:

$ apt-cache showpkg vlc

3: Check Dependencies Using dpkg Command

The dpkg command works when you have the .deb file. To get package dependencies using dpkg, what you need to do is run this command with installed .deb file path like mentioned in the syntax:

$ dpkg --info [deb_file_path]

For example:

$ dpkg --info google-chrome-stable_current_amd64.deb

4: Check Dependencies Using apt-rdepends Command

There is also a tool which is not pre-installed on Linux Mint 21 system named apt-rdepends. Through using this tool, you can display all application dependencies on terminal:

To get it, install it first using the given command:

$ sudo apt install apt-rdepends

Now, execute with the help of the following syntax to list down package dependencies on the system:

$ apt-rdepends [package-name]

To explain this, let’s find Java dependencies by making use of apt-rdepends command:

$ apt-rdepends default-jdk

5: Check Dependencies Using apt-show Command

Another way to get dependencies details of a specific tool or application is using the apt-show command. This would be done through the following syntax:

$ apt show [package_name]

Now, execute this on the terminal to get a better understanding:

$ apt show firefox


When we install a system, some of the additional packages are also installed with them to let the software function properly. And there might be a case that these are already installed in a system.

This article has focused on how to get dependencies of a specific application on the Linux Mint 21 system. We have got various command-line tools like apt-show, apt-rdepends, showpkg, apt-cache and dpkg. This article has worked on each mentioned command with examples.

About the author

Syeda Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.