How to Update Arch Linux
There are many popular Linux distributions, including Arch Linux, that operate on a rolling release model. When you regularly update your Arch Linux, you not only gain access to the newest features, but it also protects your system against any potential security risks.
You can keep your system secure and stable by regularly installing updates from the official repository. Updating Arch Linux gives you the latest packages with fixes. It also lets you sync your system with the official repository, so you can manage packages without errors or conflicts. Moreover, regularly updating your system will repair the broken packages and replace them with the newest version.
Therefore, updating Arch Linux is vital for your system’s performance. Let’s cover some basic to advanced ways of updating the Arch Linux system.
How to Update Arch Linux
There are different ways to update Arch Linux. So, we’ll start with the best-case scenario where just a simple command can do the trick for you, then we’ll deal with the worst-case scenario when nothing’s working.
Updating Arch Linux Using CLI
We can update Arch Linux using the Pacman tool in the command line. This is the most recommended method to update the system of Arch Linux.
To begin the updating process, first, we need to open the terminal and type the below command to update the Arch Linux system:
sudo pacman -Syu
Run the command, put in your system password, or just agree to everything that comes on your screen. It also gives us some information on how big the download is going to be.
This command performs a full system update, which means that it synchronizes the package database with the official Arch Linux repositories. After that, it upgrades all the packages that are out of date. We don’t need root privileges while using this command. We only need to use sudo and type the password when prompted.
Now, in this case, the update has been completed successfully. This may not be the most common thing that happens. So, if you are getting a ton of error messages about packages that have unknown trust or other issues, then it’s due to the signing of packages and the Arch’s keyring.
To resolve these errors, you can use the archlinux-keyring command:
sudo pacman -Sy archlinux-keyring
Run the command and type the password if prompted.
This command will synchronize the package databases and install the archlinux-keyring package. The archlinux-keyring package contains the PGP keys of the Arch Linux developers and trusted users. These keys are used to verify the authenticity of the packages you install from the official repositories. By updating the archlinux-keyring package, you can ensure that you have the latest and valid keys for your system.
After running the pacman -Sy archlinux-keyring command, you have to run the sudo pacman -Syu command to complete the update process.
Force a Database Download With Pacman
Sometimes we need to force a database download with pacman. For example, while downloading, we may encounter corrupted database files. In such cases, we can utilize a special flag with the pacman command that can download a new version of the database and verify the installed package’s integrity. This will help to synchronize the system package database with the servers, download any updates, and upgrade your system.
To force download a database with pacman package manager, append another y to the previous command:
sudo pacman -Syyu
In the above command, the -S flag tells pacman to synchronize, the -y flag tells it to refresh the database, and the -u flag tells it to upgrade. By adding a second -y flag, you are forcing pacman to download the database even if it is up-to-date.
Note: Don’t use force commands too often, as it can put unnecessary load on the servers and waste bandwidth. It is recommended to use it only when you encounter problems with your packages or when you switch to a different mirror.
Update a Specific Package in Arch Linux
We sometimes may also need to update specific packages in our Arch Linux system. However, this is not a recommended approach to update only the specific packages because of the rolling release system. If you hand-pick the packages and update only them, while ignoring others, it can cause issues.
However, if you have no choice then to update the specific package, simply replace package_name with the one you want in the below command:
sudo pacman -S package_name
Use -Qs to search for installed packages if you forgot the name of the package.
pacman -Qs package_name
Make sure to replace the package_name with what you are looking for. This will search both the package names and the descriptions, so you should be able to find them easily.
For example, if you want to search for packages related to python, you can type:
pacman -Qs python
Updating the Arch Linux System Using GUI
If you are using the Arch Linux system with a desktop environment like GNOME, KDE, or any other. You can also update your system directly from system settings. All these desktop environments have built-in application menus and settings options. This GUI interface provides you with a convenient and user-friendly environment to interact with your system.
First open Settings on your Arch Linux system:
Inside settings, navigate to the About section. From there, select the Software Updates.
Our system is already up-to-date. If you have any updates pending, you can easily install them from here.
Changing the Package Signing Configuration File
Consider an extreme case where all the above methods still have not worked. If your system is still not updating with all those given commands, then you have to touch the extreme edge. Your system update issue can be with the signing of packages.
In Linux systems the Package signing is there to help protect users, but if it gets to the stage where security is not really that important and updating your system is giving you a huge headache, this can be a last option.
Only do this if you are having serious update problems in your system because there are some security implications with following this next process.
Open the console on Arch Linux and change to the /etc directory using the command cd /etc:
cd /etc
Now when you are inside the /etc open the pacman.conf file using the vim editor with root privileges using the below command:
sudo vim pacman.conf
The pacman.conf file will open inside the vim editor. This file contains the settings for pacman, which is the package manager for Arch Linux.
Now scroll down to the SigLevel section in the document, and you will see values here for that SigLevel parameter.
Warning
In the next step, we are going to change the signature verification value. You should not prioritize this method, because it disables the signature verification for the packages you install. Signature verification is a security feature using which a system checks if the packages you download are authentic and not tampered with by malicious threats. By disabling it, you are putting your system at risk of being compromised by malware or corrupted packages.
Next, change the value of SigLevel from Required DatabaseOptional to Never. Now, after changing this parameter value, your Arch Linux system is not going to care about checking the legitimacy of packages that we’ve downloaded.
This is good in the sense that we don’t need to worry about our update process failing out, but it’s bad in the sense that the signing of packages is designed to protect us. So potentially only use this as a last resort. But if security is not a real issue depending on what you’re doing, and you just want the update process to complete, this could potentially be a fallback workaround.
Conclusion
Arch Linux is a rolling release Linux distribution, while you update the Arch Linux it will not only give you access to important new features but also give you the necessary security updates to protect your system from potential malicious threats. While the command line is the preferred method for updating the system, there are GUI tools available for those who prefer a graphical interface.
Remember to always back up your data before performing any updates, as the rolling nature of Arch Linux can sometimes lead to unexpected changes in the system. By following the steps outlined in this article, you can successfully update your Arch Linux system and enjoy a fresh, up-to-date system.







