How to

There’s no easy way to downgrade or install a different version of a package except the latest one published in AUR.

These instructions allow you to downgrade a package or install any version that was published.

  1. Visit the AUR page of that package (I will use virtualbox-bin for this example)

https://aur.archlinux.org/packages/virtualbox-bin

  1. Then, click View Changes

AUR package page for virtualbox-bin 7.0.4-1, with the View Changes link under Package Actions highlighted

  1. Select the version that you want

Git log of the virtualbox-bin AUR package, with the commit Update to version 6.1.40 highlighted

  1. Click Download

Commit page for Update to version 6.1.40, with the download link to the commit’s tar.gz snapshot highlighted

  1. Now, extract the downloaded file
  2. Open a Terminal inside the new folder
  3. Build the package by typing makepkg

This will rebuild the package and create everything that is required to be installed by pacman.

Terminal ls output after makepkg, listing the built virtualbox-bin, guest-iso and sdk 6.1.40 package files

In this case, it created the virtualbox-bin, virtualbox-bin-guest-iso and virtualbox-bin-sdk.

  1. Install the package using pacman
pacman -U virtualbox-bin-6.1.40-1-x86_64.pkg.tar.zst