Today, I was trying to build the mingw-w64-binutils package from the AUR. It failed due to an unrecognized public key. I then wanted to remove it. Typing pacaur -Rns mingw-w64-binutils did not work. Seeing as only the package was downloaded into the .cache/pacaur folder, I simply deleted its folder. However, I noticed that there are a number of packages in .cache/pacaur that did not install correctly or have been merged into other packages and are no longer in the AUR. Typing pacaur -Rns for each of these outputs a failure to locate the target package. I would like to remove these. Is removing their folder from .cache/pacaur safe to do even if the build process started and failed? Is there a standard practice for managing packages in the AUR that encounter issues like this?
Best practice for removing AUR packages that fail to build?
and i use this with attention to the output, as it can also fail and removes stuff needed:
Removing unused packages (orphans)
For recursively removing orphans and their configuration files:
sudo pacman -Rns $(pacman -Qtdq)