How to Find Out Whether a Package Is Installed in Linux

Linux Packages Featured

Linux “packages” are just collections of software, and how you install them varies from distro to distro. There are a few ways to quickly check whether a package is currently installed or not. Whether you’re comfortable using the terminal or you’d prefer a more visual approach, here’s how you can check whether or not a package is installed in Linux .

Using Package Managers

Each Linux distro includes a package manager. This, as the name suggests, is the software you use to install or remove software packages. They also include commands that let you see if certain packages are already installed.

On Debian and Ubuntu-based Linux distros, you can check for every installed package with the following command:

If you want to find a specific package, add the package name after the --installed flag. For example:

Linux Packages Apt

If the package is installed, you’ll see a brief line with the package name and installed version number. Packages that aren’t installed won’t appear at all.

You can also use dpkg to check for installed packages by typing:

This will give you a description of the package, including version and size, but it’ll also display whether or not it’s installed.

Linux Packages Dpkg

Arch Linux users can check using pacman, the Arch package manager. Open a terminal and type:

If you’re using Fedora, you can find out the same by using dnf and typing:

These commands will require you to know the name of the package you’re looking for, but certain package managers, like dnf, allow you to use wildcards like * to help you search.

Using “which” or “has” on Any Linux Distribution

There are other ways to use the terminal to find out whether a package is installed. The which command is one example, which shows you the installation location of any package.

If you search for sudo, for instance, it will display the location of sudo in “/usr/bin/sudo.” To use it, type:

Replace packagename with the name of your package.

Linux Packages Which

Alternatively, you can also use a third-party solution called has.

You can install it to your Linux machine directly or, if you trust the script, run the script directly from the Internet. You’ll need to have the curl package installed to be able to do this. Open the terminal and type:

You can check a single package or several packages at once. Just replace packagename with the name of your package.

Linux Packages Has

Installed packages will have a green tick next to it along with the version number. Packages that aren’t installed will be displayed with a red cross.

Visual Methods for Checking Installed Packages

If you’d rather avoid the terminal, most Linux package managers come with a GUI alternative to perform the same tasks.

One of the best options, and one that should work across multiple distros, is GNOME Software. This will work with various package managers like apt or pacman, and comes pre-installed with Ubuntu.

Linux Packages Gnome Software

It has a simple GUI with an “installed” section that lists installed software on your PC, although it’s simplistic and won’t list every package.

If you need more detailed information, Debian and Ubuntu-based distributions can use the Synaptic Package Manager. This is a GUI wrapper for aptthat lets you search through and install packages, as well as see which packages you already have installed.

Linux Packages Synaptic

Installed packages will be displayed with a green checkbox next to the package name, as well as the package version, listed under the “Installed Version” category.

You may need to install it first (which will involve opening the terminal), but the installation is quick. Open the terminal and type:

Arch Linux users have a variety of GUI wrappers for pacman, their package manager, to choose from. You can find out more about these from the Arch Linux wiki.

Easily Identifying Installed Packages

One of the biggest benefits of Linux is choice. You can fall back on your distro’s package manager, or you can use third-party solutions like has to find out if a package is already installed.

If you’re not comfortable using the terminal, you can use your GUI to check installed packages instead. Some of the best Linux distros for beginners make it easy to avoid the terminal completely, thanks to their own GUI software installers like GNOME Software.

Which method do you prefer? Let us know in the comments below.

Ben Stockton Ben Stockton

Ben is a UK based tech writer with a passion for gadgets, gaming, and general geekiness.