Normally, new software would be downloaded via pacman on Arch and Manjaro. When software isn’t available in official repositories, users can turn to the AUR, where they’re likely to find what they’re looking for.
What Is the AUR?
The AUR is simply a broad repository of Linux software, which any user can contribute to. It’s a great way to find brand new or niche packages that have not been absorbed into official repositories.
You can access the AUR at aur.archlinux.org. From there, you can search for packages or find instructions to submit your own software.
If a package on the AUR becomes popular enough, and is proven to have good compatibility with Arch, it will usually get absorbed into the community repository. Once that happens, the package can be downloaded through pacman.
AUR Pros and Cons
Having access to the AUR is very nice, because tens of thousands of packages are already on there. Rather than hunting down software, downloading it, and compiling it, you can just use the AUR and have the package installed in no time.
On the other hand, the AUR is completely community-driven. There’s no guarantee that packages will remain updated, or even work correctly in the first place. Ordinarily, this isn’t a big problem, but you may run into an issue every once in a while.
In the end, the AUR is a great resource to have, though it’s not a perfect repository of curated and vetted software.
Install a Package From AUR (Manually)
You can either download a package from the AUR manually, or use an AUR helper. First, we’ll go over the manual way.
Step 1. First, there are a couple of prerequisite packages that we will need to install in order to use the AUR. You can use pacman to install them.
$ sudo pacman -Sy base-devel git
Step 3. Copy the Git clone URL to your clipboard.
Step 4. Open a terminal and type the following commands to install the package. This may take a while, as the program will be compiled by
$ git clone https://aur.archlinux.org/qdirstat.git $ cd qdirstat $ makepkg -is
makepkg finishes up, the software you downloaded should now be installed and accessible. You will need to keep the software updated manually.
Step 5. If you need to remove the software later, you can do it with the ordinary
pacman command. Use the
-Rs options to remove the package and any unused dependencies.
$ sudo pacman -Rs qdirstat
Install a Package From AUR (With Helper)
If you install many packages from the AUR, keeping track of updates can be difficult. It’s recommended that you use yay, an AUR helper, which streamlines the installation of AUR packages, and manages package updates.
Let’s go through the steps to install yay, and then use it to install QDirStat from the AUR.
Step 1. First, let’s install yay, which is the best AUR helper available. It’s a pacman wrapper which makes installation of AUR packages much easier. It’s also very easy to update all your AUR packages with yay. The following command will also install the prerequisite packages in order to use the AUR.
$ sudo pacman -Sy base-devel git yay
Step 2. Now, we are able to install AUR packages with yay. As an example, let’s install QDirStat from the AUR.
$ yay -S qdirstat
sudoor have root permissions when running the
yay finishes up, the software you downloaded should now be installed and accessible.
Step 3. To update all your AUR packages, just run
yay with no further options.
yay command, when run by itself, is aliased to
yay -Syu. This command will first run
sudo pacman -Syu, then show you a list of AUR packages which need to be updated.
Step 4. You can remove a package with yay by using the
-Rs options. The
-s option isn’t strictly necessary, but will also remove unused dependencies.
$ yay -Rs qdirstat
Step 5. To clean all unneeded dependencies, use the
$ yay -Yc
Step 6. To search the AUR for software to install, specify the
yay command, followed by your search term.
$ yay dropbox
It’s still recommended that you pull up the package’s page in the AUR website, to check all details before installing the package.
Install a Package From AUR (With GUI)
Pamac is installed by default on Manjaro systems. It’s the “Add/Remove Software” option found in the menus. Pamac can also be installed on Arch Linux, or other Arch derivatives, and then used to install packages from the AUR.
The only advantage of using pamac over yay is that pamac offers a GUI. If you prefer the command line, then there’s no need to bother. Follow the steps below to use pamac to install a package from the AUR.
Step 1. First, install pamac and AUR prerequisite packages.
$ sudo pacman -Sy pamac base-devel git
Step 2. Open pamac and navigate to the preferences menu.
Step 3. Under the “Third Party” tab, enable support for AUR. It’s also a good idea to enable updates, which allows pamac to check for updates to your installed AUR packages. Close this menu when done.
Step 4. Click on the magnifying glass to perform a search. Type your query, and click on the AUR filter to see results from the AUR. Click on the green download button to install any of the packages you see in the search results.
Install Package From AUR With Pamac (command line)
With Pamac installed, you can access the AUR via command line in addition to GUI. The
build option will retrieve the specified package from the AUR and then compile and install it. Let’s use Pamac to install
QDirStat from the AUR:
$ sudo pamac build qdirstat
The AUR is a really helpful and convenient feature for users of Arch and its derivative distributions. You can choose between installing packages manually, using a command line AUR helper, or a GUI AUR helper. The main advantage of an AUR helper is that they will manage updates for you and make searching a bit easier.