How to Use AUR in Arch Linux

Archaur Package

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 the 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 an immense catalogue of software that’s not in the official repositories.

Use Aur In Arch Aur Home

How to Use The AUR in Arch Linux

There are two ways to access the AUR’s collection of software.

Most people prefer to use AUR Helpers, which work similarly to Arch’s default package manager, Pacman, while introducing some of their own quirks and features such as allowing you to edit the build configuration on the fly. This approach automates pulling and building source code from the AUR while using familiar commands.

Alternatively, you can download the package directly from the AUR and compile it manually.

Using an AUR Helper

There are many AUR helpers you can use. Yay is arguably the most popular. 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:
sudo pacman -S --needed base-devel git

You’ll 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.

  1. Type y and press Enter when asked if you’d like to proceed with the installation.
Use Aur In Arch Install All
  1. To bring yay onboard, first pull its code:
git clone https://aur.archlinux.org/yay.git
Use Aur In Arch Git Clone Yay
  1. Enter the yay folder:
cd yay
Use Aur In Arch Enter Yay Git Dir
  1. Build the package:
makepkg -si
Use Aur In Arch Yay Makepkg
  1. Press y when asked if you’d also like to install the built package.
Use Aur In Arch Yay Install

Tip: If you are coming from Ubuntu or Debian, you can also install deb file in Arch Linux.

Using Yay to Install AUR Packages

Yay uses a similar syntax as Pacman, so you can easily install AUR packages using the same command:

yay -Ss package

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

yay -Ss google-chrome
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 files required by the software you’re trying to install.

Use Aur In Arch Yay Install Dependencies

Using Yay to Uninstall 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.

The -n and -s flag instruct Yay to ignore any backup designations and remove all dependencies of the package that are not in use, respectively.

For example, to remove Google Chrome:

yay -Rns google-chrome
Use Aur In Arch Yay Uninstall App

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

yay -Yc
Use Aur In Arch Yay Remove Remnants

Graphical Approach to Install and Manage AUR Packages

If you prefer a graphical approach, you can install pamac with Yay.

To install pamac, use the command:

yay -S pamac-aur

After the installation, you can run the “Add/Remove Software” application in your App menu. If it helps, you can also simply type “pamac” into the search bar and the application will pop up anyway.

Pamac Interface

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

Pamac Enable Aur Support

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

Good to know: For better package management, you might want to consider install snap applications in Arch Linux.

Installing AUR Packages Manually

If you decide to go the manual route, you can download the packages from the AUR directly, compile, and install them. As an example, here are the steps to manually grab Google Chrome from the AUR:

  1. Ensure you have the base development tools and git installed with:
sudo pacman -S --needed base-devel git
  1. Clone Google Chrome’s git locally:
git clone https://aur/archlinux.org/google-chrome.git
Use Aur In Arch Git Clone Chrome
  1. Change into the directory created by Git and install the package:
cd google-chrome
makepkg -si
Use Aur In Arch Chrome Makepkg

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

If you want to do this with other packages in the AUR, head to the database’s website and use the search function to find what you need there. You could even type a descriptive word for what you want the package to do and the database will search package descriptions for it.

Once you click on a package there, the URL you need to clone will be found under “Git Clone URL,” usually just below the package’s name on the top of the webpage.

Frequently Asked Questions

How much can I trust the AUR?

The authentication is as strict for the AUR as it is for official community packages, so the likelihood of encountering malware is exceedingly low.

However, if the package is poorly maintained, or runs as a daemon, might throw errors at you when you start your system. As with anything user-controlled, approach each application you install with a degree of caution.

There are a lot of applications maintained by members of the community and not the actual developers. These may fall out of date by a bit before an update pushes through. If something breaks during the update process, don’t panic and simply wait a little while until someone fixes it in the next update if you can.

How do I know an app will work properly?

By visiting the application in AUR page, you’ll find relevant comments when you scroll down. Sometimes users of the AUR will comment here when they have helpful tips for how to make the app work if it’s slightly broken on delivery. Other times, they’ll point to a better alternative of the same application somewhere else on the AUR that’s more properly maintained.

What does it mean when my helper says "local package is newer than AUR?"

In some cases, the maintainers for Arch’s official repository may include a package previously provided in the AUR in their own database. Oftentimes, the official package will be more up-to-date than what the AUR maintainer provides.

When this message appears on your terminal, the package installed in your system is more recent than what the AUR currently offers, prompting it to ignore upgrades for it since it would actually downgrade what you have.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Miguel Leiva-Gomez
Miguel Leiva-Gomez - Staff Writer

Miguel has been a business growth and technology expert for more than a decade and has written software for even longer. From his little castle in Romania, he presents cold and analytical perspectives to things that affect the tech world.