Automatic installation and update of AUR packages
AUR (Arch User Repository) is a large repository of programs that are (not yet) added to official Arch Linux repositories.
To search for packages in AUR you need to go to the site, and to install you need to execute several commands.
git clone https://aur.archlinux.org/PACKAGE_NAME.git cd PACKAGE_NAME makepkg -si
To update a package from AUR:
cd PACKAGE_NAME git pull makepkg -si
This is not as convenient as installing from standard repositories. This article is about the pikaur program, which makes finding, installing, and updating programs from AUR as easy as using standard repositories.
The pikaur program can be installed and run on the command line by analogy with pacman, and can also be used without installation – I will show how to do this below.
What is pikaur and what is it for
pikaur can perform all the functions of pacman and supports the options of the standard package manager. Additionally pikaur can:
- check for updates installed from AUR packages even if these packages were installed manually, without pikaur!
- automatic installation of dependencies not only from standard repositories, but also from AUR!
- update all or selectively packages from AUR
- search and install packages from AUR
- show and install new dependencies for AUR packages
- show packages that are not found in either standard repositories or in AUR
- view package details from AUR
- autocomplete package names from AUR
- show for packages from AUR diff (difference from the previous version), PKGBUILD and .install files
- ignore specified packages
How to use pikaur without installation
Intall the dependency:
sudo pacman -S pyalpm git
Download the source code of the program:
git clone https://github.com/actionless/pikaur.git cd pikaur
Search for a package from AUR
python3 ./pikaur.py -Ss PACKAGE_IN_AUR
Install package from AUR
python3 ./pikaur.py -S PACKAGE_IN_AUR
Perform a complete upgrade of system packages and AUR packages:
python3 ./pikaur.py -Syu
How to install pikaur
If you liked pikaur, then you can install this program:
sudo pacman -S --needed base-devel git git clone https://aur.archlinux.org/pikaur.git cd pikaur makepkg -fsri
Additional dependencies for 'pikaur-git' (install them as desired):
- asp: to support ABS in -G/--getpkgbuild operation
- python-pysocks: to support socks5 proxy
Examples of using pikaur
AUR Package Search:
pikaur -Ss PACKAGE_IN_AUR
For example, I want to find viber:
pikaur -Ss viber
Installing and updating the AUR package:
pikaur -S PACKAGE_IN_AUR
For example, I want to install dropbox:
pikaur -S dropbox
Updating all AUR packages and system programs:
How to clear pikaur cache
As with pacman, you can periodically clear the pikaur cache, this is done with the command:
The configuration is performed in the ~/.config/pikaur.conf file.
Let’s consider only some options in the [review] section, which can be the most annoying. Each time you install or update a package from AUR, the program prompts you to edit the PKGBUILD file:
Want to edit PKGBUILD from a package ...? [Y/n]
In general, it is good practice to analyze the contents of the recipe for installing the program. But if you trust the AUR community and/or do not understand the contents of PKGBUILD, then such suggestions seem too annoying, especially if there are a lot of packages.
When starting pikaur, you can specify the --noedit flag, and then offers to edit PKGBUILD will not be displayed.
Or you can change the settings in the configuration file:
- DontEditByDefault (default: no)
When prompted to edit this file, the default is yes. So that you do not need to enter the letter “n” each time, set the value to (yes):
donteditbydefault = yes
Or you can completely disable requests to edit PKGBUILD files, then find the directive:
noedit = no
and replace it with:
noedit = yes
In order for you not to be offered diff (display a list of differences), use the --nodiff flag, or find the directive in the configuration file:
nodiff = no
and replace it with:
nodiff = yes
Why pikaur ignores the configuration file
The configuration file is searched by the relative path. For example, if you edited the configuration file as the current user in the ~/.config/pikaur.conf folder, and you started pikaur as root:
sudo pikaur -Syu
That will actually use the configuration file /root/.config/pikaur.conf.
Therefore, in order to use the edited configuration file, run pikaur as a regular user, especially since you do not need superuser rights to work with AUR packages:
An alternative to pikaur is the pamac program, which is a graphical package manager for Manjaro Linux. This program also supports work with AUR.
Here not all the possibilities of pikaur are considered. You can use the same options in this program that pacman has.
The program has options that are not even found in pacman. It is also possible to fine tune the pikaur configuration file.
Program site with source code and additional information: https://github.com/actionless/pikaur
Last Updated on
- Comprehensive step by step guide to install Arch Linux (87%)
- How to set up the PowerShell environment on Windows and Linux (87%)
- How to install Go (compiler and tools) on Linux (82.6%)
- How to install and configure RDP server on Linux (82.6%)
- How to install NVIDIA drivers, CUDA and Bumblebee on Arch Linux / BlackArch (80.5%)
- How to enable SSH in Kali Linux. How to connect to Kali Linux via SSH (RANDOM - 50%)