Want to install packages on Arch Linux but don't know how? Many people face this problem when migrating to Arch from Debian-based distributions for the first time. However, with package managers you can easily manage packages on your Arch-based system.
Pacman is the standard package manager that is pre-installed in every Arch distribution. However, other package managers are required as Pacman does not support packages from the Arch User Repository.
Package manager in Arch Linux
Although Arch Linux comes with Pacman as the default package manager, you can install other package managers like Yay. Unlike Pacman, these package managers allow you to add new packages from the official Arch repository and the AUR (Arch User Repository).
While other package managers have been used over the years, examples such as Yaourt and Aurman are no longer maintained. As a result, Pacman and Yay are safer and more reliable package managers that they can rely on in Arch Linux.
AUR is a community organized repository that provides a platform for users to share packages they have developed. If you are a developer, you can add packages to the AUR and other users can easily install them on their system.
As mentioned above, every Arch system comes with Pacman as the standard package manager. The most notable feature of Pacman is that it regularly syncs your system's packages with the master server and keeps your system up to date.
Since the developers at Yaourt and Aurman won't release updates after the cancellation, Arch users are using Yay to add packages from the AUR. Yay's main goal was to minimize user input and provide a Pacman-like interface.
You cannot install Yay with Pacman as it does not directly support adding packages from the Arch User Repository. Hence, you have to install the Yay package manager manually from its Git repository. How to install it on your system.
Step 1: you need git to clone the yay repository.
pacman -S – requires git base-devel
Step 2: clone the repository to your local storage.
Git clone https://aur.archlinux.org/yay-git.git
Step 3: Change the folder's permissions.
chmod 777 / yay-git
Step 4: Navigate to the directory where you cloned the repository.
Step 5: use the makepkg Command to create the package. Make sure that you are not running the following command as the root user. Otherwise an error is issued.
Updating and updating packages
If you've just installed Arch Linux, you will need to sync your system with the master servers before you can add or remove packages by updating your local package list.
Then you can easily update all of your packages to the latest version by downloading the files from official servers.
Use the to update your package list with Pacman -Sy Flag with the command.
sudo pacman -Sy
After you have synchronized your system's package list with the master servers, you need to update the packages. Use the -Syu Flag to do the same. This command may take some time depending on the list of packets and your network connection.
Sudo Pacman -Syu
You can save yourself the hassle of entering both commands by combining them with the key -Syyu Flag. Pacman will automatically download the latest packages after the package list is updated.
Sudo Pacman -Syyu
Yay package manager allows you to efficiently update and update your packages using your terminal. Simply use the -Syu Flag with the yay command.
sudo yay -Syu
Adding packages is easy once you know what commands to run. All you have to do is enter the package manager commands into the terminal.
Flathub and Snap Store are two great GUI applications that you can use to install software and applications on your Linux computer.
Install packages with Pacman
Pacman uses the tar file extension to package applications. It works efficiently with the Arch Linux system architecture. To add a package you have to use this -S Flag with the standard command as follows.
sudo pacman -S package-name
sudo pacman -S cmatrix
To install multiple packages at the same time, enter the name of all packages divided by the space.
sudo pacman -S cmatrix vlc python
You can also get information about packages after they are installed. The output contains details about the name, version, architecture, and license of the package. To do this, replace the -S Flag with -Qi by default Pacman Command.
Pacman Qi cmatrix
Install packages with yay
The syntax of the Yay install command is pretty similar to Pacman's. To install a package with the Yay package manager, just use the -S Flag with the standard command.
yay -S package-name
Remove packages in Arch
Arch Linux gives you the ability to remove packages as soon as you don't need them. This is one of the many reasons why you should install Arch Linux. You can of course remove almost any package from your system if you have the permission. Let's see how you can delete a package on Arch Linux.
Remove packages with Pacman
Removing a package is also easy. All you have to do is use it -R instead of the -S Flag by default Pacman Command.
sudo pacman -R cmatrix
If the package does not exist in your system, you will receive an error output stating "Error: target not found: package name".
Remove packages with yay
To remove packages with yay, add the -R Highlight the standard command yay. You can also use the -Rns flag to remove any unnecessary dependencies from your system.
yay -R cmatrix
yay -Rns cmatrix
If you want to remove the packages your system doesn't need, use the -Yc Flag with the command.
Manage packages on Arch Linux
There are several ways to add and remove packages in an Arch-based Linux distribution. You can use package managers like Pacman, Yaourt, and Yay. While some package managers allow packages to be downloaded from the Arch User Repository, others like Pacman do not support the AUR.
If you're not a fan of package managers, you can always manually download the packages you want. There are several websites available on the Internet that offer TAR, RPM, and DEB packages to Linux users.
8 websites to download DEB or RPM Linux apps
Are you looking for Linux apps? Instead of installing from the terminal, you can download Linux apps in DEB and RPM formats from these websites.
About the author
(1 article published)
Deepesh is a tech blogger and has been writing informative content for over 3 years. He is currently completing his bachelor's degree in computer applications at a prestigious university in India. In his spare time he enjoys writing, listening to music and playing the guitar.
From Deepesh Sharma
Subscribe to our newsletter
Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive deals!
One more step …!
Please confirm your email address in the email we just sent you.