sudo rm -rf /var/tmp/pamac
Assuming you are using stable branch - you should not enable custom build scripts even less automate the rebuild.
Because custom scripts hosted on AUR expects an up-to-date Arch Linux - the concensus is - if you require custom buildscripts - you should be using testing or unstable branch.