Learning Artix Linux - Package Management with pacman
Episode 4 of 23

Learning Artix Linux - Package Management with pacman

pacman is the heart of Artix package management: rolling upgrades, installs, removals, queries, and file search. This episode covers the core commands, /etc/pacman.conf configuration, mirrorlist, and PGP signature verification for package security.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

In episode 3 you already ran pacman during installation. Now it's time to master it fully. Episode 4 covers package management with pacman — the exact same tool as Arch, so all your habits still apply.

This time we won't just memorize flags, but understand what happens behind the scenes: how pacman resolves dependencies, why the database files need synchronization, and how PGP signatures protect you from fake packages. This is the foundation you'll use throughout the series, from desktop installation to the routine updates in episode 16.

Basic pacman Operations

Synchronization and Rolling Upgrade

Artix's model is rolling release: there are no release versions, only continuous updates. Before installing anything, synchronize the package database, then upgrade the entire system:

Synchronize database and full upgrade
sudo pacman -Sy
sudo pacman -Syu

pacman -Syu is the most important command on a rolling system. You should run a full upgrade regularly — ideally weekly — because packages in the world repo depend on each other's latest versions. Never mix -Sy with partial installs over a long period.

Installing and Removing Packages

Install, remove, and remove-with-dependencies operations are triggered by a single letter difference:

Install and remove packages
sudo pacman -S htop
sudo pacman -Rs htop
sudo pacman -Rdd htop

-Rs removes a package along with dependencies that are no longer used; -Rdd removes without touching dependencies and can be dangerous, so use it only if you truly understand it. To search for packages by name and description, use:

Search packages in the repositories
pacman -Ss nginx
pacman -Si nginx

-Ss searches, while -Si shows complete information about a package, including dependencies and size. Get into the habit of using both before installing something unfamiliar.

Querying Installed Packages

To see what's installed on your system:

Query installed packages
pacman -Q nginx
pacman -Ql nginx
pacman -Qo /usr/bin/nginx

pacman -Qo answers the classic question "which package does this file belong to." It's very useful when you find a mysterious file on your system or want to know a binary's dependencies.

File Search with pacman -F

Searching Files Across All Repositories

Sometimes a binary is missing because its package isn't installed. Search for that file in the repo databases without installing anything:

Search files in the repositories
sudo pacman -Fy
pacman -F nginx.conf

pacman -F uses a file database downloaded separately from the package database. Synchronize it first with -Fy, then search for the filename. This saves time compared to guessing package names.

pacman Configuration

/etc/pacman.conf and the Mirrorlist

Repository configuration lives in /etc/pacman.conf. On a healthy Artix system, you'll see sections like this:

Repository sections in /etc/pacman.conf
[base]
Include = /etc/pacman.d/mirrorlist
 
[world]
Include = /etc/pacman.d/mirrorlist
 
[galaxy]
Include = /etc/pacman.d/mirrorlist

Testing repositories like world-testing and galaxy-testing are deliberately disabled by default because they hold packages still under testing. Episode 17 will cover when it's safe to enable them.

Choosing Fast Mirrors

Download performance depends heavily on your mirror. Artix provides the artix-mirrorlist tool to generate a mirror list sorted by speed:

Generate a mirrorlist by location
artix-mirrorlist -l id,my,sg

Afterward, move the result to /etc/pacman.d/mirrorlist. You can also build a mirrorlist manually by copying the relevant lines from the bundled /etc/pacman.d/mirrorlist. For VMs that frequently change location, use a global mirror so downloads don't fail while roaming.

Speeding Up with Parallel Downloads

pacman supports parallel downloads if enabled in the configuration. Open /etc/pacman.conf and change the following line:

Enable parallel downloads
ParallelDownloads = 5

A value of 5 is generally balanced; numbers that are too large can overwhelm the mirror. After changing it, save and try pacman -Syu — you'll see several packages downloading at once.

Package Security and PGP Keys

Package Signatures

All Artix packages are signed with GPG keys, and pacman verifies them before installing. If a key is missing, the system refuses the install with an error message. Fix it by syncing keys and updating the keyring:

Manage PGP keys
sudo pacman-key --init
sudo pacman-key --populate artix
sudo pacman-key --refresh-keys

pacman-key --populate artix loads the project's official keys into your local keyring. Periodic refreshes are useful because keys can change or new developers join.

Verifying Sources

Before installing, get in the habit of checking which repository a package comes from:

Check a package's repository of origin
pacman -Qi nginx | grep 'Repository'
pacman -Qkk nginx

pacman -Qkk verifies the integrity of installed files against the database. If any file has been modified or damaged, the output will show warnings. This is a good first step when your system behaves strangely.

Practice: A Safe Update Cycle

Combine everything you've learned into one safe update routine:

Complete update routine
sudo pacman -Syu
sudo pacman -S artix-mirrorlist
artix-mirrorlist -l id | sudo tee /etc/pacman.d/mirrorlist
sudo pacman -Syu

The sequence: full upgrade, update the mirror list, then upgrade again to pull packages from better mirrors. This habit reduces the risk of a lagging mirror on systems that have been running for a long time.

Conclusion

Episode 4 equipped you with pacman's core operations: synchronization and rolling upgrades, install and remove, installed queries, file search, repository and mirrorlist configuration, and PGP key management for package security.

Key takeaways:

  • pacman -Syu is the most important command on a rolling system.
  • -Ss and -Si for searching; -Q, -Ql, -Qo for installed queries.
  • pacman -F searches files in the repositories without installing.
  • The base, world, galaxy repositories are configured in /etc/pacman.conf.
  • artix-mirrorlist and ParallelDownloads speed up downloads.
  • Verify packages with pacman -Qkk and manage keys via pacman-key.

In the next episode, episode 5, we'll cover OpenRC: init & service managementrc-update, rc-service, rc-status, the /etc/runlevels/ and /etc/conf.d/ directories, and writing inter-service dependencies.

Learning Artix Linux - Package Management with pacman | Learning Artix Linux