Yaourt is a package manager that is mainly used in installing packages from Arch User Repository or AUR. But it can also install packages from Arch official package repository.In this article, I will show you how to install and use Yaourt. Let’s get started.
Installing Yaourt
Yaourt package manager is not available in the official package repository of Arch Linux. But it is available on Arch User Repository (AUR). So you have to install it from AUR.
First install Git with the following command:
Press ‘y’ and then press <Enter> to continue.
Git should be installed.
Now navigate to a temporary directory. You may choose /tmp,but I will choose ~/Downloads/ directory in the USER’s home directory.
Yaourt depends on another package called package-query. But it is not available on the official package repository of Arch Linux. You have to install it from AUR before you can install yaourt package.
Run the following command to clone the package-query AUR repository with Git:
package-query AUR repository should be cloned.
I listed the directory contents with ls command and you can see that a new directory package-query was created.
Navigate to the package-query/ directory with the following command:
Now you can use makepkg command to create a pacman package file using the AUR repository files. You can then install it using pacmanpackage manager.
Now run the following command to create a pacman package file for package-query:
Press ‘y’ and then press <Enter> to continue.
The package-query pacman package file is created.
I listed the directory contents of package-query/ with ls command and as you can see from the marked section in the screenshot below, a .pkg.tar.gz file was created. This is the pacman package file.
Now you can install the pacman package file with the following command:
Now press ‘y’ and then press <Enter> to continue.
package-query package should be installed.
Run the following command to check whether package-query command is working or not:
As you can see from the screenshot below, the version of package-query installed on my machine is 1.9. So it’s working.
Now go back to the parent directory with the following command:
Now you can install Yaourt.
Run the following command to clone the Yaourt AUR repository with Git:
The Yaourt AUR repository should be cloned.
A new directory yaourt/ should be created as you can see from the screenshot below.
Now navigate to the yaourt/ directory with the following command:
Now run the following command to make a pacman package file for Yaourt:
The Yaourt pacman package file should be created.
I listed the directory contents with ls command and as you can see from the marked section in the screenshot below that a .pkg.tar.xz file was created.
Now run the following command to install Yaourt with pacman:
Press ‘y’ and then press <Enter> to continue.
Yaourt should be installed.
Now run the following command to check whether yaourt is working or not:
As you can see from the screenshot below, the version of yaourt installed on my machine is 1.9. So yaourt is working.
Using Yaourt
You can search for a package using yaourt.
You can run the following command to search for packages in the Arch official repository and Arch User Repository that contains the term ‘programming’ with yaourt:
As you can see from the following screenshot, the search result is displayed. The package names as marked in the screenshot contains core/ or aur/ to represent that the package is in the official Arch repository or AUR respectively.
You can see numbers in the search result as marked in the screenshot below. You can type in the number and press <Enter> to install that particular package with yaourt. For example, if you want to install lush2, then you would be typing 3 and press <Enter>.
You can also install a package from AUR if you know the package name. For example, I am trying to install snapd package. So I ran the following command:
Keep pressing ‘y’ in every prompt.
Yaourt should download and install snapd package from AUR.
So that’s how you install and use Yaourt package manager on Arch Linux. Thanks for reading this article.