How to Remove the Mac ‘Quarantine’ Flag from Downloaded Files

macOS relies on a security system called Gatekeeper to protect users from malicious software. When you download an application from the internet using a browser like Safari or Chrome, macOS silently attaches a hidden metadata tag to the file known as the “Quarantine Flag” (com.apple.quarantine).

When you attempt to open the app, Gatekeeper sees this flag, blocks the launch, and displays a warning stating: “[App Name] is an app downloaded from the Internet. Are you sure you want to open it?” Or, if the app isn’t signed by an Apple Developer, it flatly refuses to open at all, stating it “cannot be verified.” If you are a developer testing your own unsigned code, or if you completely trust the software you downloaded, you can manually strip this quarantine flag from the file to bypass Gatekeeper entirely.

How to Remove the macOS Quarantine Flag via Terminal

You must use the xattr (extended attributes) command to delete the hidden metadata tag.

  1. Open the Finder and locate the downloaded application (usually in your Downloads or Applications folder). Leave this window open.
  2. Open the Terminal application (press Command + Space and search for Terminal).
  3. In the Terminal window, type the following command, making sure to include a single space at the very end: xattr -d com.apple.quarantine
  4. (Do not press Enter yet).
  5. Click and drag the application from your Finder window directly into the Terminal window.
  6. The Terminal will automatically fill in the correct, exact file path for you. Your command should now look something like this: xattr -d com.apple.quarantine /Applications/MyCustomApp.app
  7. Press Enter. (If you receive a permissions error, type sudo at the beginning of the command and try again).

The command will execute instantly without printing any confirmation message. The quarantine flag has been successfully deleted. When you double-click the application now, macOS will treat it as a trusted, native file and launch it immediately without any Gatekeeper warnings.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.