Arch Linux and all the distributions based upon it such as ArcoLinux, Manjaro and Endeavour OS are rolling release distributions. This is why they are updated on a daily basis. This acts as a clear advantage for the users as they get to use the latest and the greatest software programs all the time.
What is given as a boon can also act as a curse in this case. The latest software packages could have a lot of bugs and hence sometimes performs abnormally or show some glitches. In that case, it is recommended that you should downgrade the packages to their previous versions. You can also hold that specific program from updating for some time when you perform the full system upgrade.
In this tutorial, I will show you how to downgrade the packages as well as we will learn how to hold them while upgrading our system.
Downgrade packages with Pacman Cache
First of all, try and downgrading the packages to the previous versions of themselves directly from the pacman cache. This may not work work because it relies on the pacman cache being set for more than one version of the package. Let’s give it a try nonetheless. Open a terminal and type the following commands :
sudo pacman -U /var/cache/pacman/pkg/NAME_OF_PROGRAM
You don’t have to type out the full name of the program you are trying to downgrade, simply type the first full letters and then press the TAB key on your keyboard and Bash will autocomplete it for you.
As you can see, I don’t have any other version of the file manager ‘Nemo’ so I will try to downgrade it using the second Method.
Downgrade packages using the Arch Linux Archive
Visit the official Arch Linux Archive and look for the package you want to downgrade. And download the version which you like.
Once the download finishes, open the Terminal and type the following command :
sudo pacman -U /Path/to/dowloaded/package
After the Installation finishes, you can check the version of the installed package using the following command :
Exclude package from upgrading while updates
You can also exclude the package from upgrading while you upgrade your whole system by modifying the pacman’s config file. You can do this by modifying the file in your favourite text editors, such as vim or nano.
# Using vim editor sudo vim /etc/pacman.conf # Using nano editor sudo nano /etc/pacman.conf
Now, add the following lines to the file :
IgnorePkg = pacage-name
If you want to prevent updates of multiple packages, then simply separate their names with a comma (,).
Save the file by pressing Ctrl+O and exit by pressing Ctrl+X if you are using the nano editor, if you are using the vim editor then press the Escape key and type :wq.
It is important that you upgrade the package once in a while. Because they come with a lot of security and bug fixes. Holding a package can also lead to dependency errors, so be careful with that. And because Arch-based distributions are updated frequently, chances are high that any bugs discovered might get fixed very soon.