pacman: command not found

“pacman” is the package manager for Arch Linux and its derivatives. It is used to install, remove, upgrade, and manage packages on the system.

Pacman uses a simple and straightforward command-line interface, and supports multiple repository sources, including the official Arch Linux repository and any additional repositories the user has added. It also supports transactions, ensuring that packages are installed and removed in a consistent and reliable manner.

If you encounter the below error while running the command pacman:

pacman: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install pacman
Ubuntu apt-get install pacman
Alpine apk add pacman
Arch Linux pacman -S pacman
Kali Linux apt-get install pacman
Fedora dnf install pacman
Raspbian apt-get install pacman

pacman Command Examples

1. Synchronize and update all packages:

# sudo pacman -Syu

2. Install a new package:

# sudo pacman -S package_name

3. Remove a package and its dependencies:

# sudo pacman -Rs package_name

4. Search the package database for a regular expression or keyword:

# pacman -Ss "search_pattern"

5. List installed packages and versions:

# pacman -Q

6. List only the explicitly installed packages and versions:

# pacman -Qe

7. List orphan packages (installed as dependencies but not actually required by any package):

# pacman -Qtdq

8. Empty the entire pacman cache:

# sudo pacman -Scc

Summary

In summary, “pacman” is a powerful and flexible package manager for Arch Linux and its derivatives, providing a simple and efficient way to install, remove, upgrade, and manage packages on the system.

Related Post