xattr macOS quarantine

xattr macos

A new binary file downloaded from the internet can't be automatically executed in macOS, because macOS adds an extended attribute to the file that tags it as com.apple.quarantine.

It's possible to remove this attribute via the CLI.

# binary is quarantined
$ xattr phantomjs
com.apple.quarantine

# remove the attribute
$ xattr -r -d com.apple.quarantine phantomjs

# gone
$ xattr phantomjs

You might be interested in these notes:

  • Couldn't find similar notes.