I love using pacman and prefer it to other Linux package managers

2 weeks ago 3

There's no shortage of choice when managing packages on Linux. The most popular option is apt, which is the default for many Debian-based distros such as Ubuntu and Linux Mint. Then there's dnf on Fedora and pacman for Arch Linux. I've extensively used apt for decades and dabbled with other options throughout the years of testing numerous Linux distros. Still, I find pacman to be the best of the bunch, thanks to its robust syntax usage, performance, and reliability. That's not to say apt and the others are bad ... but since switching to Arch on my primary rig, I'm happy sticking with pacman, although yay comes in a close second for accessing AUR.

What is a package manager?

And why is it important on Linux?

A package manager on Linux handles the downloading, installing, updating, and removing of packages, which are archives containing files of an application, as well as metadata and directives. You could think of a package similar to an executable file for Windows, but with far more versatility through manual installation and easier management through a manager such as pacman. Unlike Windows, Linux doesn't install packages and insert entries into a central registry of sorts, making this method far more efficient and clean for removing unnecessary apps or dependencies. A few are available on most distros, though they all perform similar tasks.

When installing or updating packages through a manager, it will automatically update all the necessary files and dependencies, as well as install anything the package may require without user input. Instead of firing up an app only to be met with an error that something else hasn't been installed, a package manager will take care of this for you during the installation phase, allowing you to open the app without issue. When uninstalling a package, every file is removed, leaving no remnants that can clog up the system, taking valuable storage space. As alluded to in the opening of this piece, the three most popular package managers are apt, dnf, and pacman.

So long as you're not adding any dodgy repositories to your system, the package manager will ensure any software installed on your Linux PC will be from a legit source. Think of it as a distant CLI relative of the Microsoft Store on Windows. Pacman was originally created by Judd "ZeroFlux" Vinet for Arch Linux, but has since been adapted for other Linux-based distros. Pacman has been developed alongside Arch Linux to take advantage of its rolling release nature. This provides pacman users with the latest packages available, whereas apt and dnf may be a version or two behind, focusing on stable upgrades over cutting-edge advancements.

Hyprland Arch Linux on Framework laptop

Related

6 things I wish I knew about Arch Linux before switching

Arch is my new go-to Linux distro, and here are some things I wish I knew about it sooner.

Why I enjoy using pacman

It's quick, easy, and powerful

If I want to check for and install any updates using apt, as well as download a new package, I would have to use the command sudo apt update && sudo apt upgrade && sudo apt install [packagename]. That's not a terrible use of syntax and is fairly easy to remember. Three commands joined together with two double ampersands. For pacman, it's far easier. This command becomes sudo pacman -Syu [packagename]. That's it. The -S tag is to have pacman install a package. -y synchronizes the repository databases and -u installs any updates. Installing the package without updating the system would be sudo pacman -S [packagename].

Removing a package with apt would be sudo apt remove [packagename]. For pacman, the same command is sudo pacman -R [packagename]. I find it far simpler to learn and use pacman's syntax over other package managers. It's also faster because pacman isn't checking absolutely everything for breaking changes like apt would. Doing so does aid those less tech-savvy or who simply don't wish to deal with any potential issues, but if you don't mind working on your own software-related trouble, the speed increase through a streamlined install process is worth having. Although one could argue apt is safer, especially if you lose power during installation.

Then there's AUR integration with yay or paru. As well as having the official Arch Linux repository, the Arch User Repository (AUR) is available, where software can be found that isn't necessarily available through the default channels. AUR also makes it easier to pull content from GitHub and other sources that can prove troublesome with .deb and other packages. I prefer to live on the edge and enjoy convenient access to the latest releases, making pacman and Arch the perfect combination. While I may prefer pacman over others, this may not be the best option for you, especially if you're new to Linux.

arch-linux-dke-konsole-neofetch-1

Related

How I made Arch Linux look and run better than Windows

Arch Linux is a great distro and it's easy to make it better than Windows 11.

A great way to learn something new

Diving in the deep end

Using pacman and the Arch distro is one of the best ways to fast-track your Linux learning, as they will force you to learn commands for the CLI and better understand how the underlying systems work and interconnect with one another. It may be daunting at first, but once you've mastered a few commands and start to see how the syntax works, you'll be running programs and scripts from the CLI in no time. Pacman isn't just a package manager fit for use by enthusiasts, but it's also a great choice for those looking for something slightly different from what's seen in countless Debian-based distros.

Read Entire Article