🐧 How to list installed packages on Linux

This quick tutorial explains how to list all installed Linux packages from the command line with examples.

The commands for displaying all installed packages differ depending on the type of package manager you are using.

I’ve included example commands for all the popular package managers.

1.How to list installed packages on Arch Linux using pacman command

Pacman is the default package manager for Arch Linux and its derivatives such as Manjaro Linux.

To list all installed packages using pacman on Arch Linux and its variants, run:

$ pacman -Q

If you want to view the page scrolling output, pipe the output to the more command, as shown below:

$ pacman -Q | more

To list only explicitly installed packages and versions:

$ pacman -Qe

To display only the total number of installed packages on Arch Linux, pipe the output of pacman to the wc command:

$ pacman -Q | wc -l
134

As you can see from the above output, I have installed 134 packages on my Arch Linux system.

2. How to list installed packages in Alpine Linux using apk command.

Apk, short for Alpine Package Manager, is the default package manager for Alpine Linux.

The command to view the list of installed packages in Alpine Linux:

$ apk info

If you want to see a list of installed packages, as well as the version number and description of the package, use the -vv flag as shown below:

$ apk info -vv

Output:

lm_sensors-3.4.0-r6 - Collection of user space tools for general SMBus access and hardware monitoring.
man-1.14.3-r0 - dummy package for upgrade compatibility.  this can safely be removed
libcrypto1.1-1.1.1i-r0 - Crypto library from openssl
libssl1.1-1.1.1i-r0 - SSL shared libraries
[...]

To list only the total number of all installed packages in Alpine Linux, pipe the output of apk information to the wc command as shown below:

$ apk info | wc -l
86

3. Let’s list the installed packages in Debian, Ubuntu using the apt command.

Apt provides a high-level command line interface for the package management system on Debian, Ubuntu and other Debian based systems.

To display a list of installed packages on Debian, Ubuntu, Linux Mint and other DEB based systems, run:

$ apt list --installed

Display the total number of packages installed on Debian based systems, pipe the output of apt command to wc command as shown below:

$ apt list --installed | wc -l
2575

4. Let’s list the installed packages in Debian, Ubuntu using the dpkg command.

Dpkg is a command line tool for installing, building, removing and managing Debian packages.

To list all installed packages with versions and details using the dpkg command, run:

$ dpkg -l

Alternatively, you can use the dpkg-query command to list all installed Debian packages.

$ dpkg-query -l

List only the total number of packages installed on Debian based systems:

$ dpkg -l | wc -l
2668
$ dpkg-query -l | wc -l
2668

5. Listing installed packages in RHEL, Fedora, CentOS using the yum command.

Yum, short for Yellowdog Updater, Modified, is a command line management utility for installing and managing packages on Red Hat based systems.

It has now been replaced by dnf in the latest RHEL and CentOS versions.

To find a list of installed packages on Fedora, RHEL and its clones such as CentOS, run:

$ yum list installed

🐧 How to list installed packages on Linux

Only print the total number of installed packages using the yum and wc commands:

$ yum list installed | wc -l
347

6. Let’s list the installed packages in RHEL, Fedora, CentOS using the dnf command.

DNF is the next generation version of YUM and has been the default package manager since Fedora 22, RHEL 8 and CentOS 8.

DNF usage is the same as in Yum.

To find a list of installed packages in RHEL, Fedora, CentOS using dnf, run:

$ dnf list installed

If you only want to display the total number of packages using the dnf command, run:

$ dnf list installed | wc -l

7. How to list installed packages on openSUSE using the zypper command.

Zypper is the default command line package manager for installing and managing packages on SUSE and openSUSE.

To view a list of installed packages on openSUSE using zypper, run:

$ zypper se --installed-only

8. How to list installed packages in Linux using rpm command.

The RPM command, short for Red Hat Package Manager, is used to install and manage applications from the command line on Redhat-based systems.

To list all RPM packages installed on your system, run:

$ rpm -qa

To view the scrolling output, redirect the output to the more command:

$ rpm -qa | more

You can also list all installed packages, the most recent of which are at the top, using the –last flag, as shown below:

$ rpm -qa --last

The following two methods are generic. You can use these commands on any system that has Snap or Flatpak tools installed.

9. How to list packages installed with Snap on Linux.

Snap is a software deployment and package management system developed by Canonical.

To list all Snap apps installed on your system, run:

$ snap list

Output example:

Name                  Version                     Rev    Tracking         Publisher   Notes
chromium              87.0.4280.88                1424   latest/stable    canonical*  -
core                  16-2.48                     10444  latest/stable    canonical*  core
core18                20201210                    1944   latest/stable    canonical*  base
gnome-3-26-1604       3.26.0.20200529             100    latest/stable/…  canonical*  -
gnome-3-28-1804       3.28.0-19-g98f9e67.98f9e67  145    latest/stable    canonical*  -
gnome-3-34-1804       0+git.3556cb3               60     latest/stable    canonical*  -
gnome-system-monitor  3.36.0-12-g35f88a56d7       148    latest/stable/…  canonical*  -
gtk-common-themes     0.1-50-gf7627e4             1514   latest/stable/…  canonical*  -
multipass             1.5.0                       2907   latest/stable    canonical*  -

10. How to list packages installed with flatpak on Linux.

Flatpak is a platform-independent package management system for building, installing, and running isolated desktop applications and runtimes on Linux.

To list all installed Flatpak applications on Linux, run:

$ flatpak list --app

Output:

Name       Application ID               Version Branch Installation
Fondo      com.github.calo001.fondo     1.5.1   stable system
Flatseal   com.github.tchx84.Flatseal   1.6.5   stable system
FontFinder io.github.mmstick.FontFinder 2.0.0   stable system
Giara      org.gabmus.giara             0.3     stable system
Solanum    org.gnome.Solanum            1.1.0   stable system

Please note that the above command will only list packages that are installed exclusively with the flatpak app.

For more information, see the manual pages for the respective commands.

see also:

🐧 How to list or install security updates only using dnf on CentOS / RHEL 8

2️ Two methods to check or list installed security updates on Redhat (RHEL) and CentOS system

How to use DNF history to view manually installed packages

πŸ“¦ How to display the contents of a Linux package

How to show installed packages by size on CentOS / Fedora / Arch Linux

Sidebar