Home Arch Linux How To Downgrade All Packages To A Specific Date In Arch Linux

How To Downgrade All Packages To A Specific Date In Arch Linux

By sk
Published: Last Updated on 6.1K views

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 a system upgrade. In such cases, you may need to downgrade more than one packages to a previous working version. Let us see how to do that.

Warning: Don't do this unless it is ABSOLUTELY 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 problems. 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 a broken 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 the following steps.

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 /etc/pacman.conf file:

$ 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:

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.


Related Read: 


Hope this helps.

Reference:

You May Also Like

6 comments

Jane Doe August 22, 2017 - 11:39 pm

Always a pleasure to read your posts!
Thanks for the tip.
Keep up with the excellent work!

Reply
SK August 23, 2017 - 3:07 pm

Thank you.

Reply
Threadzilla August 23, 2017 - 5:36 am

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.

Reply
kapil April 5, 2018 - 8:57 am

sir what will happen if i keep future date in the command

Reply
Duilio August 23, 2019 - 2:39 am

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

Reply
Mathias October 3, 2019 - 10:32 pm

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.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More