> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# RUA: Yet Another Way to Install AUR Packages in Arch
- URL: https://itsfoss.com/rua-aur-tool/
- Published: 2024-03-26T07:29:01.000Z
- Updated: 2024-03-26T12:46:05.000Z
- Description: An AUR helper written in Rust but with its own, easier to follow, subcommand structure.
- Author: Community
- Tags: CLI Tools

Love it or hate it, an Arch user cannot ignore [AUR](https://itsfoss.com/aur-arch-linux/), a community-oriented repository where Arch Linux users can share their own packages. After all, the [list of official packages](https://archlinux.org/packages/?ref=itsfoss.com) in Arch Linux can be considered a bit restrictive. You’ll probably find that obscure app you’ve been looking for weeks there in AUR.

While you can build packages from the AUR, most people feel more comfortable using [AUR helpers like yay](https://itsfoss.com/best-aur-helpers/), Paru, pikaur etc. 

The most used AUR installer is [yay](https://github.com/Jguer/yay?ref=itsfoss.com), Yet Another Yogurt. `yay` follows the very same API as [Pacman](https://archlinux.org/pacman/?ref=itsfoss.com), which is very convenient for Arch Linux users: you don’t need to learn a new API for managing AUR packages.

Okay, since `yay` is enough a tool, we don’t need another one, okey dokey, end of story, right?

Nope… 😁

I wouldn’t be writing this article if I didn’t have an exciting alternative to show you!

## Meet RUA: AUR helper written in Rust

Do you remember my [UPT article](https://itsfoss.com/upt/)? If so, I’m considering you are that kind of person that rather stick to a common interface than use a different one for each system. The UPT interface is way more similar to [APT](https://wiki.debian.org/Apt?ref=itsfoss.com) or [Homebrew](https://brew.sh/?ref=itsfoss.com) than to Pacman.

If you liked UPT, I guess you might also prefer an AUR installer with a similar interface.

It exists and it’s called [**RUA**](https://crates.io/crates/rua?ref=itsfoss.com) which is AUR spelled backward.

It is a build tool for AUR, just like `yay`, but with subcommands like `install`, `upgrade`, and `search` instead of `-S`, `-U`, `-Syu`, `-R`, `-Q`, and so on.

I actually prefer the regular install, upgrade, search options in the command then trying and remembering the permutation and combination of S, Y, U, R etc letters.

And that's the reason why I love RUA. Let me show you how to install it and use it.

## Installing RUA

It’s necessary to install some dependencies before you install RUA:

```bash
sudo pacman -S --needed --asdeps git base-devel bubblewrap-suid libseccomp xz shellcheck rustup
sudo rustup install stable

```

![installing dependencies for RUA](https://itsfoss.com/content/images/2024/03/pre.svg)

🚧

****DO NOT** install RUA as root, it’s intended to be performed ONLY as a sudoer, not directly by root.

Since RUA is a tool made in [Rust](https://www.rust-lang.org/?ref=itsfoss.com), and it can be easily installed by `cargo`:

```bash
rustup default stable
cargo install rua

```

![installing rua with cargo](https://itsfoss.com/content/images/2024/03/cargo.svg)

## Using RUA for AUR packages

Let’s [install Brave browser on Arch Linux](https://itsfoss.com/install-brave-arch-linux/) with RUA. Search for it first and then install the package:

```bash
rua search brave
rua install brave-bin

```

![installing brave in Arch with rua](https://itsfoss.com/content/images/2024/03/brave.svg)

Considering the happy flow, you can answer most of the questions:

- `m` (`[M]=accept/merge`)
- `o` (`[O]=ok, use package` and `[O]=ok, proceed`)
- `s` (`Enter S to ‘sudo’ install it`)
- `y` (any question that ask for a “yes”)

Now I decided not to keep it, so let’s uninstall it using the Pacman or UPT command. 

```bash
upt remove brave-bin

```

## Upgrading packages

Pacman and UPT have no information about AUR packages’ source for upgrade! Nevertheless, you can use RUA itself to upgrade them. 

The following command updates all packages installed by rua:

```bash
rua upgrade

```

A list of the RUA’s full capabilities can be obtained from the command:

```bash
rua --help

```

![help](https://itsfoss.com/content/images/2024/03/help.svg)

## Safety

When building packages, RUA uses the following filesystem isolation:

- Build directory is mounted read-write.
- Files `"$GNUPGHOME"/pubring.kbx` and `"$GNUPGHOME"/pubring.gpg` are mounted read-only (if exists). This allows signature verification to work.
- The rest of `~` is not visible to the build process, mounted under `tmpfs`.
- `/tmp` and `/dev` and `/proc` are re-mounted with empty `tmpfs`, devtmpfs and procfs accordingly.
- The rest of `/` is mounted read-only.
- You can whitelist/add your mount points by configuring `wrap_args`. See example in `~/.config/rua/.system/wrap_args.sh.example`.

All builds are run in a namespace jail, with `seccomp` enabled and `user`, `ipc`, `pid`, `uts`, and `cgroup` being unshared by default.

## Conclusion

If you feel comfortable with UPT, you can use the pair UPT+RUA to manage all your packages, both official and AUR.

But that's just my suggestion. I like Rust and I like exploring various newer CLI tools written in Rust. And lately, I am liking sharing them with you.

So, please tell me if like discovering such tools. What features you like or dislike in RUA?

✍️

[Rodrigo Montegasppα Cacilhας](https://github.com/cacilhas?ref=itsfoss.com) is a Linux veteran with over 25 years of experience playing with Linux systems and writing code.