Skip to main content
luniox

Basic on pacman

Table of contents

Jump to section titled: Table of contents

Pacman Commands Cheat Sheet

Jump to section titled: Pacman Commands Cheat Sheet

Pacman is the package manager for Arch Linux and its derivatives. It is used for package management, installation, and removal.

Update Package Lists

Jump to section titled: Update Package Lists
sudo pacman -Sy

-Sy: Synchronizes the package databases.

Upgrade All Packages

Jump to section titled: Upgrade All Packages

sudo pacman -Syu

-Syu :Synchronizes databases and upgrades all installed packages to their latest versions.

A Package

Jump to section titled: A Package

Install

Jump to section titled: Install
sudo pacman -S package_name

-S : install a package

Remove

Jump to section titled: Remove

a Package

Jump to section titled: a Package
sudo pacman -R package_name

-R: Remove a package_name

its Dependencies

Jump to section titled: its Dependencies
sudo pacman -Rn package_name

its Dependencies, and Configuration Files

Jump to section titled: its Dependencies, and Configuration Files
sudo pacman -Rns package_name

Search for a Package

Jump to section titled: Search for a Package
pacman -Ss search_term

Display Information about a Package

Jump to section titled: Display Information about a Package
pacman -Qi package_name

List installed Packages

Jump to section titled: List installed Packages
pacman -Q
pacman -Qn
pacman -Qm

Orphaned Packages

Jump to section titled: Orphaned Packages

List:

pacman -Qdtq

Remove

sudo pacman -Rns $(pacman -Qdtq)

Clean

Jump to section titled: Clean

Package cache

Jump to section titled: Package cache
sudo pacman -Sc

-SC: Removes old package versions from the cache.

All Package Cache

Jump to section titled: All Package Cache
sudo pacman -Scc