So, you are using Arch Linux.
That already says a lot.
It says you are brave, curious, and possibly the kind of person who reads installation logs like other people read restaurant menus.
Now you want to install yay — one of the most popular AUR helpers for Arch Linux.
Excellent.
pacman is great for official repositories, but sometimes you need software from the AUR, also known as:
“That magical place where the package you need exists, but your sense of safety becomes negotiable.”
Let’s install yay properly.
What Is yay?
yay is an AUR helper.
In simple words, it helps you install packages from the Arch User Repository without manually cloning repositories, checking PKGBUILD files, and questioning your life choices every five minutes.
With yay, you can install AUR packages like this:
yay -S package-name
You can also update your entire system, including AUR packages:
yay -Syu
Beautiful.
Dangerous? Sometimes.
Useful? Absolutely.
Very Arch? Painfully.
Before We Begin
Before installing yay, make sure your system is updated.
This is Arch Linux.
If you do not update your system, the system may remember this betrayal.
sudo pacman -Syu
Let it finish.
If it asks questions, read them carefully.
Do not just press Enter like you are skipping a YouTube ad.
Step 1: Install the Required Packages
To build yay, you need git and base-devel.
Install them with:
sudo pacman -S --needed git base-devel
Here is what these packages do:
gitlets you clone theyayrepository.base-develgives you the tools needed to build packages from source.--neededtellspacmannot to reinstall things you already have.
Very polite.
Very civilised.
Almost suspicious.
Step 2: Clone the yay Repository
Now clone the official yay package from the AUR:
git clone https://aur.archlinux.org/yay.git
This creates a folder called yay.
Move into it:
cd yay
At this point, you are standing inside the package build directory.
Do not panic.
This is normal Arch behaviour.
Step 3: Build and Install yay
Now build and install the package:
makepkg -si
Important:
Do not run this command with sudo.
Seriously.
makepkg should be run as a normal user.
It will ask for your password only when it needs to install the final package.
This is one of those Arch rules that sounds small but exists because someone, somewhere, once had a bad afternoon.
The command will:
- download the required source files,
- build the package,
- install it using
pacman.
If everything goes well, congratulations.
You now have yay.
Your system is slightly more powerful.
Your responsibility has increased.
Your terminal has gained new drama potential.
Step 4: Test yay
Check if yay is installed:
yay --version
If you see a version number, everything is working.
You can also run:
yay
Running yay without arguments usually starts an interactive update/search process.
It is like saying:
“Hello Arch, surprise me.”
Sometimes Arch does.
Updating the System with yay
Once yay is installed, you can update both official repository packages and AUR packages with:
yay -Syu
This is probably the command you will use most often.
It works similarly to:
sudo pacman -Syu
But it also checks AUR packages.
Very convenient.
Also very capable of making you read build messages at 23:47 when you only wanted to install one tiny thing.
Installing AUR Packages with yay
To install an AUR package, use:
yay -S package-name
For example:
yay -S visual-studio-code-bin
yay will show you package information and ask for confirmation.
Read what it shows.
Yes, actually read it.
The AUR is powerful, but it is not a magical garden where every flower is safe to eat.
Searching for Packages
You can search for packages like this:
yay package-name
For example:
yay google-chrome
This will search both official repositories and the AUR.
Then you can choose what to install.
This is useful, but be careful.
Sometimes you search for one package and discover twelve similar ones with names that sound like they were invented during a caffeine emergency.
Updating Only yay
If you specifically want to reinstall or update only yay, you can run:
yay -S yay
But normally, you do not need to do this manually.
A regular system update with:
yay -Syu
will update yay too, if an update is available.
Because yes, the tool that updates things also updates itself.
Very philosophical.
Very Linux.
Cleaning Up After Installation
After installing yay, you can remove the build folder if you want.
First, go back to your home directory:
cd
Then remove the cloned folder:
rm -rf yay
Only do this if you are sure you are deleting the correct folder.
This is Linux.
The terminal does exactly what you tell it to do, not what you emotionally intended.
A Small Warning About the AUR
The AUR is one of the best parts of Arch Linux.
It is also one of the reasons Arch users develop strong opinions and unusually fast reading skills.
Before installing AUR packages, you should understand that:
- AUR packages are maintained by users.
- They are not official Arch packages.
- You should check the package details before installing.
- You should be careful with unknown or unpopular packages.
In short:
Use the AUR.
Love the AUR.
But do not treat the AUR like a free candy box from a stranger in a dark alley.
Common yay Commands
Here are the commands you will probably use most:
Update everything
yay -Syu
Updates official packages and AUR packages.
Install a package
yay -S package-name
Installs a package from the repositories or the AUR.
Remove a package
yay -R package-name
Removes a package.
Search for a package
yay package-name
Searches for packages.
Clean unused dependencies
yay -Yc
Removes dependencies that are no longer needed.
Use this carefully.
Not fearfully, but carefully.
Like handling a hot cup of coffee near a laptop.
Final Thoughts
That’s it.
You have installed yay on Arch Linux.
You can now install AUR packages, update your system more conveniently, and feel slightly more powerful every time your terminal scrolls for several seconds.
Arch Linux is not always the easiest path.
But it is honest.
It gives you control, responsibility, and occasionally a package build error that teaches you more than you wanted to learn before lunch.
Now go ahead and enjoy your new AUR helper.
And remember:
Installing yay is easy.
Using the AUR wisely is where the real Arch adventure begins.
