As you might know, Arch Linux is a rolling release and DIY (do-it-yourself) distribution. So you have to be bit careful while updating it often, especially installing or updating packages from the third party repositories like AUR. You might be end up with broken system if you don’t know what you are doing. It is your responsibility to make Arch Linux more stable. However, we all do mistakes. It is difficult to be careful all time. Sometimes, you want to update to most bleeding edge, and you might be stuck with broken packages. Don’t panic! In such cases, you can simply rollback to the old stable packages. This short tutorial describes how to downgrade a package in Arch Linux and its variants like Antergos, Manjaro Linux.
### Downgrade a package in Arch Linux
In Arch Linux, there is an utility called** “downgrade”** that helps you to downgrade an installed package to any available older version. This utility will check your local cache and the remote servers (Arch Linux repositories) for the old versions of a required package. You can pick any one of the old stable package from that list and install it.
This package is not available in the official repositories. You need to add the unofficial **archlinuxfr** repository.
To do so, edit **/etc/pacman.conf** file:
```
$ sudo nano /etc/pacman.conf
```
Add the following lines:
```
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
```
Save and close the file.
Update the repositories with command:
```
$ sudo pacman -Sy
```
Then install “Downgrade” utility using the following command from your Terminal:
Just type the package number of your choice, and hit enter to install it.
That’s it. The current installed package will be downgraded to the old version.
**Also Read:[How To Downgrade All Packages To A Specific Date In Arch Linux][1]**
##### So, how can avoid broken packages and make Arch Linux more stable?
Check [**Arch Linux news**][2] and [**forums**][3] before updating Arch Linux to find out if there have been any reported problem. I have been using Arch Linux as my main OS for the past few weeks. Here is some simple tips that I have found over a period of time to avoid installing unstable packages in Arch Linux.
1. Avoid partial upgrades. It means that never run “pacman -Sy <package-name>”. This command will partially upgrade your system while installing a package. Instead, first use “pacman -Syu” to update the system and then use “package -S <package-name>” to a install package.
2. Avoid using “pacman -Syu –force” command. The –force flag will ignore the package and file conflicts and you might end-up with broken packages or broken system.
3. Do not skip dependency check. It means that do not use “pacman -Rdd <package-name>”. This command will avoid dependency check while removing a package. If you run this command, a critical dependency which is needed by another important package could be removed too. Eventually, it will break your Arch Linux.
4. It is always a good practice to make regular backup of important data and configuration files to avoid any data loss.
5. Be careful while installing packages from third party and unofficial repositories like AUR. And do not install packages that are in heavy development.
For more details, check the [**Arch Linux maintenance guide**][4].
I am not an Arch Linux expert, and I am still learning to make it more stable. Please feel free to let me know If you have any tips to make Arch Linux stable and safe in the comment section below. I am all ears.
Hope this helps. That’s all for now. I will be here again with another interesting article soon. Until then, stay tuned with OSTechNix.