How To Downgrade All Packages To A Specific Date In Arch Linux
We already have covered how to downgrade a single package in Arch Linux and Ubuntu. Today, in this brief tutorial, we will see how to downgrade all packages to a specific date in Arch Linux. The reason to do this is your Arch Linux might be broken after recent system upgrade. In such cases, you might have to downgrade more than one packages to a previous working version.
Warning: Don’t do this unless it is necessary!
- Having old and outdated packages in your Arch Linux is not recommended. Read the Arch Linux news and forums regularly before updating your Arch Linux system to find out if there have been any reported problem. If users have reported any problem, don’t do system update. Wait for one or two days and do the update once the problems have been sorted out.
- If downgrade fails for any reason, you will end up with broken a system. You may not boot into your partial upgraded system.
If you have no choice and wanted to fix the unstable Arch Linux, you can then downgrade all packages to a previous specific version as described in this guide.
Downgrade All Packages To A Specific Date In Arch Linux
Let us say your Arch Linux system was stable and working fine two days ago. You ran the system update today, and it broke the system. So, you can downgrade all packages to a previous specific date, say 18 August 2017.
To do so, first backup your pacman.conf file:
sudo cp /etc/pacman.conf /etc/pacman.conf.bak
Then, edit file /etc/pacman.conf:
sudo vi /etc/pacman.conf
Replace the existing contents with the following lines:
[core] SigLevel = PackageRequired Server=https://archive.archlinux.org/repos/2017/08/18/$repo/os/$arch [extra] SigLevel = PackageRequired Server=https://archive.archlinux.org/repos/2017/08/18/$repo/os/$arch [community] SigLevel = PackageRequired Server=https://archive.archlinux.org/repos/2017/08/18/$repo/os/$arch
Or, edit /etc/pacman.d/mirrorlist file:
sudo vi /etc/pacman.d/mirrorlist
Replace the contents with following lines:
Double check the restore date. Save and close the file.
Finally, update the database and force Arch Linux update using command:
sudo pacman -Syyuu
Once the update is finished, reboot your system. That’s it. You have now restored all packages to the previous specific date (In our case it’s 18 August 2017). Again, I warn you that having outdated packages is not recommended.
Recommended Read: Systemback – Restore Ubuntu Desktop and Server to previous state
Hope this helps. If you find this guide useful, please spend a moment to share it on your social, professional networks, so that all users can benefit from it. I will be posting more useful guides everyday. Stay tuned.
Source and reference:
Thanks for stopping by!
Help us to help you:
- Subscribe to our Email Newsletter : Sign Up Now
- Support OSTechNix : Donate Via PayPal
- Download free E-Books and Videos : OSTechNix on TradePub
- Connect with us: Facebook | Twitter | Google Plus | LinkedIn | RSS feeds
Have a Good day!!