Home Package management How To List Installed Packages In Linux

How To List Installed Packages In Linux

By sk
Published: Last Updated on 20,408 Views

You could have installed many applications on your Linux system. This brief guide explains how to list all installed packages in Linux from command line with examples.

The commands to display all installed packages varies depending on the type of the package manager you use. I have included example commands for all popular package managers.

1. Display installed packages using pacman in Arch Linux

Pacman is the default package manager for Arch Linux and its derivatives like EndeavourOS and Manjaro Linux.

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

$ pacman -Q

Sample output:

List installed packages using Pacman command in Arch Linux
List installed packages using Pacman in Arch Linux

If you want to view the output page by page, pipe the output to more command like below:

$ pacman -Q | more

To list only the explicitly installed packages and versions:

$ pacman -Qe

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

$ pacman -Q | wc -l
134

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

You can also export all installed packages to a text file and install them later on a freshly installed Arch Linux. For details, check the following guide:

2. Get list of installed packages using apk command in Alpine Linux

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 is:

$ apk info
View installed packages using apk command in Alpine Linux
View installed packages using apk command in Alpine Linux

If you want to view the list of installed packages with along with version number and package description, use -vv flag like below:

$ apk info -vv

Sample 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 apk info output to wc command like below:

$ apk info | wc -l
86

3. Find installed packages using apt command in Debian, Ubuntu

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

To display the list of installed packages in Debian, Ubuntu, Linux Mint and other DEB-based systems, run:

$ apt list --installed

Sample output:

Display installed packages using apt command in Debian, Ubuntu
Display installed packages using apt command in Debian, Ubuntu

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

$ apt list --installed | wc -l
2575

4. Using dpkg command in Debian, Ubuntu

Dpkg is a command line tool to install, build, remove and manage Debian packages.

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

$ dpkg -l
Get installed packages using dpkg command
Get installed packages using dpkg command

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

$ dpkg-query -l
Get all installed Debian packages using dpkg-query command
Get all installed Debian packages using dpkg-query command

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

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

5. Using yum command in RHEL, Fedora, CentOS

Yum, stands for Yellowdog Updater, Modified, is the command line management utility to install and manage packages in Red-hat based systems. It is now replaced with dnf in the recent versions of RHEL and CentOS.

To find the list of installed packages in Fedora, RHEL and its clones like CentOS, run:

$ yum list installed
List installed packages using yum command
List installed packages using yum command

List only the total number of installed packages using yum and wc commands:

$ yum list installed | wc -l
347

6. Using dnf command in in RHEL, Fedora, CentOS

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

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

$ dnf list installed

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

$ dnf list installed | wc -l

7. Using zypper command in openSUSE

Zypper is the default command line package manager to install and manage packages in SUSE and openSUSE.

To list installed packages in openSUSE using zypper, run:

$ zypper se --installed-only

8. Using rpm command

RPM command, stands for Red Hat Package Manager, is used to install and manage applications from command line in Redhat-based systems.

To list every RPM package installed on your system, run:

$ rpm -qa

To view the output page by page, pipe the output to more command:

$ rpm -qa | more

You can also all installed packages with the latest ones at the top using --last flag like below:

$ rpm -qa --last

The following two are universal methods. You can use these commands on any systems that have installed with either snap or flatpak tools.

9. List packages installed with snap

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

To list all snap applications installed on your system, run:

$ snap list

Sample output:

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*  -
List installed snap applications in Linux
List installed snap applications in Linux

10. List installed packages using flatpak

Flatpak is a platform-independent package management system to build, install and run sandboxed desktop applications and runtimes on Linux. 

To list all installed flatpak applications in Linux, run:

$ flatpak list --app

Sample 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
List packages installed with flatpak in Linux
List packages installed with flatpak in Linux

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

For more details, refer the man pages of the respective commands.

You May Also Like

1 comment

Jalal December 19, 2020 - 9:45 am

Hi,
Thanks a lot

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More