How to Use AUR in Arch Linux

Use Aur In Arch Featured

If you’re using Arch Linux or an Arch-based distribution like Manjaro, Archbang, or EndeavourOS, you’ve probably seen the term AUR. What is it? How can you use it? Find out what AUR is and how to use AUR in Arch Linux.

What Is AUR?

The Arch User Repository (AUR) is a place where you can find software that’s not tested by Arch’s creators and maintainers but by its users. Thanks to this, you can access more software that’s not in the official repositories.

Use Aur In Arch Aur Home

How to use AUR in Arch Linux

There are two ways to access AUR’s collection of software. Most people prefer to use AUR Helpers, which works similarly to Arch’s default package manager, Pacman. This approach automates pulling and building source code from AUR while using familiar commands. Alternatively, you can download the package directly from AUR and compile it manually.

Use AUR with a Helper

There are many AUR helpers you can use. Yay is probably the most popular today, so for this article, we’ll go with that.

1. Install the necessary development tools and git, if they’re not already available in your distribution:

You’ll probably be presented with multiple software additions and asked to choose which you’d like to install.

Use Aur In Arch Install Git Base Dev

Go for the default option, “all,” by hitting Enter on your keyboard.

2. Type “y” and press Enter when asked if you’d like to proceed with the installation.

Use Aur In Arch Install All

3. To bring yay onboard, first pull its code:

Use Aur In Arch Git Clone Yay

4. Everything you downloaded will be in a subfolder named “yay.” Enter it with:

Use Aur In Arch Enter Yay Git Dir

5. While in that folder, build the actual package with:

Use Aur In Arch Yay Makepkg

6. Answer “y” when asked if you’d also like to install the built package.

Use Aur In Arch Yay Install

Using YAY to Install AUR Packages

Yay uses a similar syntax as Pacman. So you can easily install AUR packages, use the command:

For example, to install Google Chrome, you can use:

Use Aur In Arch Yay Install Google Chrome

What’s great with AUR helpers like yay is that they also deal automatically with dependencies. Those are the extras needed by anything you’re trying to install that you’d otherwise have to hunt down and install yourself.

Use Aur In Arch Yay Install Dependencies

Uninstalling AUR packages

To uninstall anything installed through yay, you’ll have to use yay again. For that, you can use the -R parameter, but it’s better if you go for -Rns, which does a better clean-up job. For example, to remove Google Chrome:

Use Aur In Arch Yay Uninstall App

You can also remove extra packages and any remnants from past installations with yay with:

Use Aur In Arch Yay Remove Remnants

If for some reason you don’t like yay or don’t want to use it, you can also use other AUR helpers like aurutils, aura, pacaur, pakku, pamac, pikaur, and trizen.

Graphical Approach to Install and Manage AUR Packages

If you prefer a graphical approach, much like the software center in Ubuntu, you can install pamac with Yay.

To install pamac, use the command:

After the installation, you can run the “Add/Remove Software” application in your App menu.

Pamac Interface

Click on the hamburger icon and go to the “Preferences” section. Under the “AUR” section, toggle to enable AUR support.

Pamac Enable Aur Support

Now you can search for AUR packages and install/remove them.

Installing AUR Packages Manually

If you decide to do things the manual way, you can download the packages from the AUR repository, compile, and install them. Here are the steps:

1. Ensure you have the base development tools and git installed with:

2. Clone Google Chrome’s git locally:

Use Aur In Arch Git Clone Chrome

3. Turn it into a package and install it:

Use Aur In Arch Chrome Makepkg

Soon after, you’ll find Google Chrome among the rest of your installed apps.

The Fresh Apps and Perils of AUR

AUR gives you (almost) the whole wide world since you can find almost any applications/packages there. However, you have to keep in mind the software in the AUR repository hasn’t been extensively tested. In some cases, a package could not be installed (due to missing dependencies/gpg error, missing files, etc.), or cause problems to your system. It is always best to double-check before installing anything from AUR.

If you are getting started with Arch Linux, you may want to get familiar with Pacman first instead of AUR.

Related:

Odysseas Kourafalos Odysseas Kourafalos

OK's real life started at around 10, when he got his first computer - a Commodore 128. Since then, he's been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.