Skip Navigation

yay -Syu Permission Denied

Howdy, everybody. I'm posting this here in an attempt to begin to move some information that is currently only stored on Reddit over to Lemmy instead, that way we'll start coming up in Google searches and we can get our information locally. I'll post my source in the comments if anyone's interested.

Problem: When running yay, either to install or update a package, you get an error along the lines of
rm: cannot remove '~/.cache/yay/arbitrary-file': Permission denied.

Solution: Oftentimes, it's because your permissions are wrong. You can either use chmod (helpful article) or you can use your file explorer (for Dolphin you right-click, go to properties, and then permissions) and give the build directory to give the build directory, usually ~/.cache/yay, read and modify permissions for both your user and your group, and make sure to give it to all of the subdirectories and files too. If ~/.cache/yay is not your build directory, it will be specified by the yay config, which is usually ~/.config/yay/config.json. Hope this helps any prospective Linux users, having the information about and available I think is good for the community.

Note: This is probably the cause and solution of a lot of other permission-denied problems for yay, but I can only confirm for myself.

Edit: Improved formatting.

1 comments