How to List Installed Packages With Pacman

Pacman is the default package manager for Arch Linux and its derivative Linux distributions like Manjaro and EndeavourOS. In this tutorial, we will show the useful pacman commands that allow us to list installed packages.

Listing Installed Packages

Example 1. To list all the installed packages with pacman:

$ pacman -Q

Example 2. To check the total number of installed packages, we can pipe the output to the wc command:

$ pacman -Q | wc -l

Output of the total number of packages installed

Example 3. Use the -Qe options to list explicity installed packages. This means packages that were not installed as dependencies.

$ pacman -Qe

Example 4. To list only packages that were installed as dependencies to other packages:

$ pacman -Qdt

Example 5. To view more information about a specific package:

$ pacman -Qi package_name

Search for a Package

Example 1. To search for a package:

$ pacman -Ss package_name

Example 2. If you want to search for packages that contain a given string in their name:

$ pacman -Ss wget

Output of the packages that contain the name wget

Don’t forget that Arch Linux and its derivative distributions also utilize the AUR. Pacman can’t install packages from the AUR, but you can check our guide on Install Package From AUR to learn how to do it.

Leave a Comment

Your email address will not be published. Required fields are marked *