macOS 'The application can't be opened' error fix

macOS Errors Beginner 👁 0 views 📅 May 25, 2026

The app won't open because of a quarantine flag or signing issue. Here's the real fix and why it works.

Yeah, that error is annoying. You download a legit app, double-click it, and macOS throws up some vague message about it being damaged or can't be opened. But it's not damaged — it's a quarantine flag that's gone sideways. Here's how to fix it, right now.

The fix

  1. Open Terminal (found in Applications/Utilities).
  2. Type this command, but don't press Enter yet:
xattr -cr /Applications/AppName.app

Replace AppName.app with the actual name of your app. For example, if it's called 'SomeApp.app', run:

xattr -cr /Applications/SomeApp.app

That -c flag clears all extended attributes (including the quarantine flag). The -r flag does it recursively, covering everything inside the app bundle.

If you're not sure where the app is, drag it from Finder into the Terminal window — Terminal will auto-fill the full path.

Now try opening the app again. If it still complains, run this:

sudo spctl --master-disable

That temporarily disables Gatekeeper (Apple's app-signing check). Open the app once, then re-enable Gatekeeper with:

sudo spctl --master-enable

Yes, you can leave Gatekeeper off, but that's a security risk — I wouldn't do it for long.

Why this works

Every app you download from the internet gets a quarantine extended attribute (com.apple.quarantine). macOS uses this to check if the app is notarized by Apple. Sometimes that flag gets corrupted — maybe the download paused, the server was flaky, or the app was compressed and decompressed wrong. The result: macOS thinks the app is broken when it's actually fine.

The xattr -cr command strips all that metadata and tells macOS to treat the app like it came from your own machine. I've fixed dozens of apps this way — from Adobe installers to indie games to enterprise VPN clients. It almost never fails.

The spctl bypass is for apps that are genuinely unsigned or from a developer who didn't pay Apple's notarization fee. If xattr doesn't do it, this will.

Other variations of this error

  • "App is damaged and can't be opened. You should move it to the Trash." — Same fix. The app isn't damaged; the quarantine flag is wrong. Use xattr -cr.
  • "App can't be opened because it was not downloaded from the App Store." — Right-click the app and select Open from the menu, then click Open in the dialog. That bypasses Gatekeeper for that one launch. Or use the spctl trick above.
  • "The application cannot be opened because it is from an unidentified developer." — Same as above. Ctrl-click > Open works. But if that fails, go to System Settings > Privacy & Security > scroll down and you'll see a message about the app being blocked. Click "Open Anyway".
  • App crashes immediately after opening. — This is usually not the quarantine flag. Could be a missing dependency or an architecture mismatch (e.g., Intel-only app on Apple Silicon without Rosetta). Install Rosetta 2 first: softwareupdate --install-rosetta. If it's something else, check Console.app for crash logs.

Prevention

You can't stop macOS from adding the quarantine flag — that's by design. But you can avoid this error by:

  • Downloading apps only from the developer's official site, not sketchy mirrors or zip-sharing sites.
  • If the app comes as a DMG, mount it and drag the app to Applications — don't run it directly from the DMG.
  • After downloading, right-click the app and select Open once before trying to run it normally. This triggers Gatekeeper's one-time approval flow.
  • Keep macOS updated. Apple has tweaked Gatekeeper behavior several times — newer versions are less finicky.
  • If you're a developer signing your own apps, use codesign -s and get notarization from Apple. It's free and prevents this error for your users.

Bottom line: don't trash apps just because macOS says they're damaged. Most of the time, it's a false alarm. Run those two terminal commands, and you're golden.

Was this solution helpful?