Pamac does not permanently cache packages from AUR

Hello all,

I found that apparently, pamac, in contrast to yay, for example, does not seem to permanently cache packages downloaded and built from AUR.
There is a pamac cache under /tmp/pamac/aur-[your-user] but as it is under /tmp, it will be deleted on each reboot.

Is it possible to configure pamac in a way that it stores the built installation packages permanently, like yay does?

This is user-setting.
You can choose any directory you want in preferences.

You can change it yes, with the GUI, as shown by @cscs, or you can do it in the config file itself:

micro /etc/pamac

The setting:

## AUR build directory:
BuildDirectory = /var/tmp


As pointed out by @cscs, thank you by the way, I neglected to add a sudo i the command:

sudo micro /etc/pamac

Edit 2:

Just found out my theory regarding polkit handling the authentication was correct. So, sudo is not neccessary:

sudo micro /etc/pamac

However, sudoedit might be a better idea:

Gonna need sudo there …
Though I wish folks would properly set EDITOR and SUDO_EDITOR variables and use


I was under the impression that sudo shouldn’t be used, but that authentication would be asked for, if required, by polkit.

My bad…

Oh. heh. It does now ‘attempt sudo while saving’ if you do that.
*the more you know*

(still prefer sudoedit so we dont have to guess editors or change docs … and it also does things in temporary files then applies changes, and has niceties for policies and links)

Thank you very much for this confirmation. I already have this setting in my /etc/pamac.conf.
Pamac then creates a subdirectory pamac-build-[username] and builds the packages there.

Unfortunately, the packages (*.pkg.tar.xz or *.pkg.tar.zst files) seem to be deleted from that folder after being installed successfully.

The setting

## Number of versions of each package to keep in the cache:
KeepNumPackages = 3

in /etc/pamac.conf does not seem to apply to AUR packages but packages from the official repository only.

That is a pity as it prevents downgrading to earlier versions as it would be possible for packages installed with pacman or yay.
In particular, for packages retrieved from AUR and built from sources, it sometimes may be useful to downgrade to a previous version known to be working.

I have uncommented


in /etc/pamac.conf now. Let’s see if that works :slight_smile:

That was going to be my suggestion just now. :wink: Let’s see, yes.

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