0

I'm trying to remove the com.apple.quarantine extended attribute from the peazip.app application on macOS as recommended in the docs using the following command:

sudo xattr -r -d com.apple.quarantine /Applications/peazip.app

However, I receive an error indicating that the -r option is not recognized:

$ sudo xattr -r -d com.apple.quarantine /Applications/peazip.app

option -r not recognized

usage: xattr [-slz] file [file ...]
       xattr -p [-slz] attr_name file [file ...]
       xattr -w [-sz] attr_name attr_value file [file ...]
       xattr -d [-s] attr_name file [file ...]
       xattr -c [-s] file [file ...]

What's going on? Why is -r not recognized? I couldn't find the software version. xattr doesn't seem to have a --version flag.

1 Answer 1

1

Running which -a xattr to see all versions of xattr on the PATH revealed that rather than the default system xattr, I was using a version that came with a Python installation (possibly homebrew, possibly pipx, not sure):

$ which -a xattr
/Library/Frameworks/Python.framework/Versions/3.11/bin/xattr
/usr/bin/xattr

The Python versions misses the -r option. The original /usr/bin/xattr has it.

So to fix it, one can explicitly run:

sudo /usr/bin/xattr -r -d com.apple.quarantine /Applications/peazip.app

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .