The following error is pretty common when trying to update Homebrew on your Mac, with the
brew update command:
Error: Failed to link all completions, docs and manpages: Permission denied
This is a permissions issue that can quickly be fixed with this command:
sudo chown -R $USER:admin /usr/local/*
The command tells your computer to allow admins (you) to modify all files in the
/usr/local/ directory (
* means all).
Because you’re using
sudo you’ll be asked to type your system password to apply the change.
After typing your password and hitting enter, try running
brew update again, and now it should work.