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