Ditching Debian Unstable for Arch Linux

Alexander Rüedlinger - - Arch Linux , AUR , pacman , makepkg

Three weeks ago I decided to switch from Debian Unstable to Arch Linux on my main desktop system, namely a Thinkpad T450s. While I really like Debian and apt, I realized that Debian Unstable is just the wrong choice as a rolling release distribution on my desktop system. It's too easy to break a Debian Unstable system during transition phases. No wonder Debian Unstable is called unstable :-).

Anyways, I'm already using Arch Linux on a second system for some time and didn't encounter any problems so far. Finally, this experience gave me confidence to ditch my Debian Unstable system in favour of Arch on my main system.

tilix-neofetch

As a Debian user, however, I took some time to get used to the package manager pacman and its switch options. But its switch options and CLI make sense once one has read the great manual page :-). Another nice feature of Arch is the simple packging system, which is pretty straightforward. I also like the concept of the aur repositories, which allow users to create their own Arch packages. Not to mention that the AUR provides lot of software like pycharm-community, spotify, or pencill.

Anyways, the following information summarizes the basic knowledge that I adapted as a former Debian user while using Arch Linux.

Package Management

The following table sketches more or less my mental model of mapping pacman commands to the corresponding apt commands. A great overview of other mappings for other package managers can be found on this great Arch Wiki article [1].

Debian Arch Linux Description
apt install pkg pacman -S pkg Install package pkg.
apt remove pkg pacman -Rs pkg Remove package pkg.
apt purge pkg pacman -Rns pkg Remove package pkg and config files.
apt update pacman -Syy Update local package database.
apt update && apt upgrade pacman -Syu Upgrade installed packages.
apt search pkg pacman -Ss pkg Search for package pkg.
apt show pkg pacman -Si pkg Show infornation about package pkg.
apt list -i pacman -Qe List installed packages.
apt list -u pacman -Qu List packages that can be updated.
apt policy pkg pacman -Qe/-Qi pkg Show version of installed package.

Installing Software from the AUR

Installing software from the Arch User Repository (AUR) is actually pretty simple. In short, all we need is a basic knowledge of the tools git, makepkg, and the AUR website. Of course one could use an AUR helper like yaourt or pacaur. However, it doesn't hurt to know how it is done manually.

Simple Packages

For example, simple AUR packages like neofetch can be installed as follows:

git clone https://aur.archlinux.org/neofetch
cd neofetch
makepkg -si

The table blow explains some of the used makepkg options [2].

Command Description
makepkg Build the package using the PKGBUILD in the current directory.
makepkg -s Install missing dependencies using pacman.
makepkg -i Installed the build package.
makepkg -c Clean up leftover work files and directories after a successful build.

Complex Packages

Other and more complex AUR packages like the awesome terminal emulator tilix require some manual dependency resolution :-). For example, it depends on the AUR package gtkd which needs to be installed first before we can proceed with the manual installation of tilix.

Summarized this package can be installed as follows:

mkdir ~/aur && cd ~/aur
git clone https://aur.archlinix.org/gtkd && cd gtkd && makepkg -si && cd ~/aur
git clone https://aur.archlinux.org/tilix && cd tilix && makepkg -si && cd ~/aur

Overall, the workflow of installing manually software from the AUR is as follows:

  1. Go the website aur.archlinux.org and search for the package.
  2. Once found, copy the Git clone URL and use git to clone the repo of the AUR package. In other words, run git clone https://aur.archlinux.org/{package-name}
  3. Next, install the required AUR dependencies that are mentioned on the AUR website.
  4. Afterwards, cd to the package directory and check the PKGBUILD file if it does what it is supposed to do!
  5. Next, install the dependencies and build the package using makepkg -s.
  6. Once the package is build, install it via makepkg -i.

References