World News

Which Linux package manager is better for beginners

https://www.profitableratecpm.com/f4ffsdxe?key=39b1ebce72f3758345b2155c98e6709c

Summary

  • APT = clear commands, huge official repo, stable but slower.
  • Pacman = faster, smaller packages, terse flags to learn; AUR builds let you inspect sources.
  • Beginners: pick Debian/Ubuntu (APT). If ready to learn or use beginner Arch, choose Pacman for speed/AUR.

The package manager is what primarily makes a Linux distribution special. You can always swap out the desktop environment, the window manager, and the shell, but you’re stuck with the package manager built into the distro you’re using. And unless you go out of your way to avoid the terminal, you will be interacting with the package manager fairly often. So it makes sense to give that choice some thought, especially if you’re new to the Linux ecosystem. The Advanced Package Tool (or APT) and Pacman are the two most popular package managers out there, and I’ll try to help you pick one.

APT syntax is more readable

I have used APT for almost a decade because I started and stayed with Debian and Debian-derivatives. That changed last year when I switched to Arch and I have been using Pacman since. The first thing that jumped out at me was the syntax. With APT, you work with a straightforward syntax, which is very easy to memorize. For example, to update all your package lists on a Debian/Ubuntu system, this is what you’d run:

sudo apt update
Type sudo apt update into the Ubuntu terminal and press Enter to update your software package repository list.

To install an app, you simply enter this.

sudo apt install gparted
In the terminal, type sudo apt install gparted and press Enter.

To remove an app,

sudo apt remove gimp
sudo apt remove gimp to remove just GIMP.

To search for apps in the APT repo,

sudo search libreoffice

Just looking at them, you know exactly what each command does. Now let’s compare that to the Pacman syntax. Instead of spelling it out, Pacman uses uppercase and lowercase letters that can be strung together for different operations. Here’s how that looks.

To install an app with pacman, you run a command like so,

sudo pacman -S libreoffice
Installing Libreoffice with pacman.

To search the official pacman repo for packages, you add a lowercase ‘s’ to the same command.

sudo pacman -Ss libreoffice
Searching the pacman repos for Libreoffice.

Removing packages with pacman works like this,

sudo pacman -R libreoffice

To update and upgrade packages,

sudo pacman -Syu
Updating Arch linux with pacman.

So you can see the Pacman syntax isn’t as intuitive, and it takes a little practice to learn and master.

Pacman is faster

In all my years of using APT regularly, I never considered it slow. If anything, compared to graphical installers, it felt snappy. It was only when I switched to Pacman that I realized just how fast command-line package managers can be. Pacman, on average, feels twice as fast at removing and installing packages. It’s partly because Pacman packages are more compressed in size and the package manager itself is more streamlined.

Pacman package manager checks for available upgrades.

However, like I said, I could only really tell the difference once I’d used both APT and Pacman. If speed and simplicity are something you prioritize, Pacman is your new friend.

APT has more apps

By default, APT and Pacman pull packages from their respective official repositories. The packages in these repositories are digitally verified and come from trusted sources, so you can rest assured that the software you’re getting wasn’t tampered with at any point. That’s true for both Pacman and APT, but what makes them different are the package repos themselves. Let me explain.

Arch Linux, which gives you the Pacman package manager, is a rolling release distro. That means it doesn’t update the way Debian or Windows do. Instead of a new version coming out every few months or years, Arch Linux only has one version and that version is always the latest version. The Arch Linux system and its software are constantly updated, so they’re always current. Any packages installed from the official Arch Linux repositories using Pacman are always the latest available version too.

Arch Linux GNOME desktop with two terminal windows open.

The trade-off is that the official Arch repository has fewer packages available. Roughly speaking, the package count in the official APT repositories is 10 times higher than Pacman’s. APT rarely ever comes up empty when you request a software package, but it’s a common experience with Pacman. That’s why Arch users have to rely on community-maintained repos (more on that in a bit).

Updating repositiories with the sudo apt update command in Raspberry Pi OS.

Fewer available packages isn’t the only trade off either. The latest packages aren’t always the most stable ones, which is why you might have heard that Arch Linux breaks more often than Debian. With APT, you might not always get the latest version of the software, but it will generally be the most stable version. That’s the general sentiment, at least. Personally, I’ve never noticed a difference and I use Pacman almost daily.

Whether you use APT or Pacman, sometimes your requested app won’t be available in the official repositories. When that happens, you have to source the app from an unofficial repo.

On Debian or Ubuntu, you have to manually add such repositories, called PPAs or Personal Package Archives. Then you have to manually verify that the packages aren’t corrupted or malicious, and only then can you install the requested app using APT. The problem is that you have to put trust in the PPAs because the packages are precompiled and not vetted by anyone. You can’t inspect what patches have been applied to the package or see its source code. You just have to sort of trust the PPA maintainer.

Backing up PPAs on Ubuntu.

Arch does this differently. When a package isn’t available in the official repos, you can usually find it in the Arch User Repository or AUR. It’s a community-maintained repo of bash scripts that contain instructions for compiling the packages from source (for example, GitHub). These repos let you build the packages yourself on your machine and review the source code. Those scripts also run integrity checks to make sure you’re getting authentic software. Arch users can review the bash scripts themselves on the AUR website and flag them if they’re broken or malicious.

The AUR Arch User Repository Homepage.

You don’t even have to manually handle those bash scripts because there are AUR helpers (like yay or paru) which do the work for you. You would run a command like this, and the AUR helper will automatically build the package locally and hand it to Pacman to install it on your machine.

yay -S spotify
Installing apps using yay.

Verdict

If you’re new to Linux, I’d never recommend you go for vanilla Arch Linux (unless you’re a hobbyist with the patience to tinker and learn). It’s hard to set up and easy to break. That’s why most beginner-friendly distros are based on Debian or Ubuntu. However, there are a few Arch-based distros that are perfect for beginners.

Manjaro XFCE Start Menu.

For example, I can wholeheartedly recommend the Arch-based CatchyOS (which I use as my main system) to new Linux users. It has a point-and-click installer, and it feels just as homely as any other operating system (provided you select a familiar desktop environment like KDE or Cinnamon during the installation).

CatchyOS default terminal.

Ultimately, you can get started with Pacman just as easily as with APT, if you choose the right distro. But which is the right choice for you?

Pacman is objectively faster, and its unofficial repos are more secure, but APT has more official packages and its commands easier to read and remember. The trade-off with APT is that installing anything outside the official repos is a big hassle, and it’s a bit slow. The trade-off with Pacman is that it takes a little bit to learn the command syntax and compiling packages locally from AUR is slower. As a beginner, if you’re fine with using CatchyOS or a similar distro, Pacman gets my vote. Otherwise, I’d stick with APT and a Debian-based system.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button