How to clear (remove) macos extended attributes recursively from a directory?
Solution 1:
Quick and easy solution (combination of this answer to this question and this blog post):
xattr -cr brew-master
(using sudo
if and only if this is within root directory)
Slightly more refined solution from the same blog post:
xattr -r -d com.apple.quarantine brew-master
An even better solution would be to use command-line tools to fetch and extract such an archive in order to avoid this kind of issue in the first place. This kind of solution is part of my answer on how to install Homebrew manually.