I'm on macOS Monterey and am running an application which depends on binaries for Postgres. So when I first start up the program, I get the "can't be opened b/c Apple cannot check it for malicious software..." for the binary file "pg_ctl". So I go into Security & Privacy settings and click the Allow Anyway button and all good, we're past that one.

The problem is there are over 50 dependency files that throw this warning. So I have to go through the process of allowing the file, kill the app process, start the app again to get the next file that needs to be allowed, for each individual file. This last install I did took 30 mins to get through it all. I now have to go install this on several other Macs.

So my question is whether there is way to "whitelist" all these files at once? Perhaps add all their paths to some plist somewhere? Or maybe use the xattr command shown in the accepted answer of this thread: "Install Spotify" can't be opened because Apple cannot check it for malicious software but do so to several files at once?

  • 1
    You can use xattr with multiple files, just list them one after another in the command
    – Ezekiel
    Commented May 19, 2022 at 16:07

1 Answer 1


In terminal, type xattr -r -d com.apple.quarantine /path/to/directory/containing/the/binaries/*. The -r flag tells the command to recurse through the directory, removing the flag on all files.

  • These are binaries files so these files have no extension to their filenames at all. Does that change things?
    – Stpete111
    Commented May 19, 2022 at 17:37
  • 1
    @Stpete111 I've updated my answer. Commented May 19, 2022 at 18:12

You must log in to answer this question.

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