:::cs
[!ref icon="git-branch" text="Github Gist"](https://gist.github.com/rajayonin/64f3191b4f8a69f82583e7cb95b68e74)

First, go to the directory containing the `PKGBUILD` file for the package. If you're using [YAY](https://aur.archlinux.org/packages/yay) (as you should), that path is `~/.cache/yay/<package-name>`.

Once there, as there is a Git repository present, just reset the tree to your desired version.  
E.g., to go to the previous version:
```
git reset --hard HEAD^1
```
Then, build with [Makepkg](https://wiki.archlinux.org/title/Makepkg):
```
makepkg -si
```
:::
