Usage guide for the pacman command

# Quick Guide to pacman: Arch Linux’s Package Manager

`pacman` is the quintessential package manager of Arch Linux and its derivatives (like Manjaro or EndeavourOS). Its goal is to be simple, lightweight, and powerful. In this guide, we review the most essential commands to keep your system up to date.

## 1. Update the System
Before installing anything, it is essential to synchronize the databases and update existing packages.
“`bash
sudo pacman -Syu
“`
* `-S` (Sync): Synchronize.
* `-y` (refresh): Download the repositories’ databases.
* `-u` (sysupgrade): Update outdated packages.

## 2. Install a Package
To install new software, simply use:
“`bash
sudo pacman -S package_name
“`

## 3. Remove a Package
If you no longer need a program, you can remove it in several ways:
* Only the package: `sudo pacman -R package_name`
* Package and its unused dependencies: `sudo pacman -Rs package_name`

## 4. Search Packages
Not sure how a package is called? Search in the repositories:
“`bash
pacman -Ss keyword
“`
Or if you want to see what you already have installed:
“`bash
pacman -Qs keyword
“`

## 5. Clean the Cache
Over time, `pacman` accumulates old versions of installed packages in `/var/cache/pacman/pkg/`. To free space:
“`bash
sudo pacman -Sc
“`

`pacman` is an incredibly efficient tool. With these basic commands, you have total control over the software on your machine. Happy hacking!

This post is also available in ESPAÑOL.

Esta obra está bajo una Licencia Creative Commons Atribución 4.0 Internacional para Francesc Roig francesc@vivaldi.net .