Skip to content

Instantly share code, notes, and snippets.

Forked from geosharma/
Last active July 8, 2022 06:01
Show Gist options
  • Save RichardBronosky/6d301cc2b109b60a7daa953825d1d19a to your computer and use it in GitHub Desktop.
Save RichardBronosky/6d301cc2b109b60a7daa953825d1d19a to your computer and use it in GitHub Desktop.
Arch Linux: aurutils installation and configuration

aurutils installation and configuration

This is not a getting started guide, just notes to myself. Due to my limited knowledge there could be mistakes and better ways to do things. I have configured aurutils to the best of my knowledge after reading the manpages and forums. Please refer to aurutils(7) manpages for installation and configuration.

Reference: aurutils(7)

Install aurutils

Install the aurutils using the normal AUR package installation procedure. Until I found aurutils, I used to create a separate directory ~/arc/aur/arch for all AUR packages and ~/arc/aur/$USER for all personal packages not in the AUR.


cd $aur_dir
git clone $aur_url
cd $(basename $aur_url .git)
makepkg -cris
sudo pacman -U *.pkg.tar*

Creating local repository

Create a separate pacman configuration file for the custom repository in /etc/pacman.d/


sudo tee /etc/pacman.d/custom<<EOF
CacheDir = $(dirname $aur_cache)/pkg
CacheDir = $aur_cache
CleanMethod = KeepCurrent

SigLevel = Optional TrustAll
Server = file://$aur_cache

Add the following lines for the custom repository configuration to the end of /etc/pacman.conf


sudo tee -a /etc/pacman.conf<<EOF

# AUR Utils config
Include = /etc/pacman.d/$(basename $aur_cache)

Create the repository root in /var/cache/pacman


sudo install -d $aur_cache -o $USER

If you already have built packages from AUR using makepkg -si copy all the *.pkg.tar* files to /var/cache/pacman/custom/ and add them to the custom database. Either way, you need to create the custom database.

aur_dir=~/src/aur/arch  # Don't include this line if it does not apply to you

cd $aur_cache
repo-add $(basename $PWD).db.tar
if [[ -n $aur_dir && -d $aur_dir ]]; then
    fd 'pkg.tar' $aur_dir | xargs sudo install -t $PWD
    repo-add -n $(basename $PWD).db.tar *.pkg.tar*

Then synchronize pacman:

sudo pacman -Syu

Install packages

For example we want to install tor-browser-en from AUR. Use aur sync to download and build AUR package and place it in the custom repository. Then use pacman -S packagename to install the package.

aur sync tor-browser-en
sudo pacman -S tor-browser-en

List all aur packages in your custom pacman repo

aur repo --list

Build and update all installed AUR packages

Update all installed AUR packages with aur sync

aur sync -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment