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 for doing 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. Let us get started.
Warning: Don't do this unless it is necessary!
Because,
- 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 be able to boot into your partially 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:
Server=https://archive.archlinux.org/repos/2017/08/18/$repo/os/$arch
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 - having outdated packages is not recommended.
Recommended Read:
Hope this helps.
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: Reddit | Facebook | Twitter | LinkedIn | RSS feeds
Have a Good day!!
6 comments
Always a pleasure to read your posts!
Thanks for the tip.
Keep up with the excellent work!
Thank you.
You should never have to do this. I’ve run Arch for many years continuously, and doing something like this has never been even close to necessary. This should be a second to last ditch effort, right before a clean install; basically it’s throwing up your hands in desperation. If you’re considering doing this, stop, ask for help, do some more research and actually fix your system instead of taking this hail mary approach.
sir what will happen if i keep future date in the command
Thanks it is very helpfull, I have a trouble with nvidia drivers, how do I install Just the nvidia driver from a specifix date? It is a nvidia gt 230 m
Thank you. I had some issues with DisplayLink (after some updates it was not refreshing properly the screen – only when the mouse moved). I tried downgrading manually some packages, without success – I guess that I missed the right ones. Using this method worked flawlessly.