Backing up/ keeping compiled AUR package using yay

I’m tired of recompiling all of my packages everytime I do a fresh reinstall. And sometimes they fail!! Like after reinstalling OS, I can’t compile the package anymore. I have to wait for the next full moon to be able to compile it. Usually the old package would still be working if it was already installed, but… I can’t install it if I can’t compile it.

Is there a way to compile AUR package once and use the compiled binary on another PC?
Or even better perhaps I could backup all the compiled binary every yay update.

I remembered I used to do that, but I forgot where and I cannot figure out where the compiled package is saved.

It is said to be in /var/cache/pacman/pkg but It’s not there.

1 Like

yay will store its files in the users cache folder
~/.cache/yay

2 Likes

oh yes it is!! thank you!

1 Like

you might want to take a look at https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Custom_local_repository and set up a local repo / cache for yourself. I have a local repo that I use to the couple of arch machines I use for exactly that same reason.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.