How to Fix macOS App Damaged and Cannot Be Opened Error (Fast 2026 Guide)

 Downloading a trusted application on your Mac only to have macOS block launch with a terrifying prompt stating the app is damaged and should be moved to the Trash is a major roadblock.

Over my eight years of testing macOS software, auditing open-source developer builds, and benchmarking Mac hardware on my workbench, I have seen this security prompt trigger thousands of false alarms. You download an installer directly from a developer website, drag the app into your Applications folder, and double-click to launch it.

Instead of opening, macOS pops up a stern dialog box stating: "App is damaged and cannot be opened. You should move it to the Trash."

Your initial instinct might be to assume the download got corrupted or that the developer sent you a malicious file. In my daily device testing and hands-on software repair work, I have found that the application package itself is almost never damaged or infected.

Instead, this warning is an overzealous security response triggered by Apple's Gatekeeper security framework, quarantine metadata flags, or missing code-signing certificates on modern Apple Silicon Macs.

Here is my definitive, field-tested guide to stripping quarantine attributes, overriding Gatekeeper blocks, and launching your blocked applications on macOS safely.

A MacBook Pro resting on a desk displaying an active macOS Terminal window and an application error alert on screen.

Why Does macOS Say a Healthy App Is Damaged?

Understanding how Apple evaluates downloaded software helps clarify why healthy applications get caught in this security net.

1. Extended Attribute Quarantine Flags (com.apple.quarantine)

Whenever you download a file or application using a web browser (like Safari or Chrome), macOS attaches an extended metadata attribute named com.apple.quarantine to the file bundle. If the developer's security certificate is slightly expired or unrecognized, Gatekeeper flags the entire bundle as broken.

2. Apple Silicon ARM64 Code Signing Mismatches

On M1, M2, M3, and M4 Macs, the operating system strictly requires all native ARM64 executables to carry a valid ad-hoc or developer signature. If a developer compiled an open-source app without an official Apple Developer ID certificate, Gatekeeper labels the unsigned binary as "damaged" to prevent execution.

3. Gatekeeper Database and Gatekeeper Rule Conflicts

Apple regularly updates its Gatekeeper malware definition databases in the background. If a security definition update revokes an older software signing key, existing apps installed on your SSD will suddenly throw damaged error prompts upon launch.

Step-by-Step Fixes to Bypass the Damaged App Error

Work through these bench-tested recovery steps sequentially to clear extended attribute flags and bypass security locks.

Step 1: Strip Quarantine Flags Using the xattr Terminal Command

The single most effective and reliable fix for the "damaged app" error is stripping the quarantine attribute directly from the application package.

  1. Open Terminal on your Mac (press Command + Spacebar, type Terminal, and hit Return).

  2. Type the following command, ensuring you leave a space at the end:sudo xattr -rd com.apple.quarantine

  3. Open your Applications folder in Finder.

  4. Drag and drop the blocked application icon directly into the Terminal window to auto-fill its file path (for example: sudo xattr -rd com.apple.quarantine /Applications/TargetApp.app).

  5. Press Return, enter your Mac administrator password when prompted, and press Return again (characters will not display on screen while typing).

  6. Double-click the application in Finder; it should now open cleanly without any error prompts.

Step 2: Override Gatekeeper Security via Right-Click Open

If Gatekeeper blocks an application due to an unverified developer signature, forcing a manual security override bypasses basic launch restrictions.

  1. Open Finder and navigate to your Applications folder.

  2. Right-click (or Control-click) the application icon and select Open from the context menu.

  3. A security dialog box will pop up asking for confirmation.

  4. Click the Open button in the pop-up window to create a permanent security exception for that specific app.

Reviewing the official Apple Support documentation on safely opening apps on Mac confirms that right-clicking to open unverified developer apps establishes a manual trust exception inside your user profile.

Step 3: Self-Sign Unsigned Binaries via CodeSign

If you are using an Apple Silicon Mac and stripping quarantine attributes fails, the application binary likely lacks an ad-hoc code signature.

  1. Open Terminal on your Mac.

  2. Type the following code-signing command, making sure to leave a space after force:codesign --force --deep --sign -

  3. Drag your target app from the Applications folder into the Terminal window to complete the file path.

  4. Press Return and enter your administrator password if requested.

  5. This forces your Mac to generate an internal ad-hoc signature, satisfying ARM64 security requirements.

Step 4: Temporarily Allow Apps from Anywhere in Gatekeeper

If an open-source or legacy application refuses to run after trying individual file fixes, disabling global Gatekeeper restrictions temporarily allows you to clear launch blocks.

  1. Open Terminal.

  2. Type sudo spctl --master-disable and press Return.

  3. Enter your administrator password and hit Return.

  4. Open System Settings > Privacy & Security, scroll down to the Security section, and ensure Anywhere is selected under "Allow applications downloaded from".

  5. Launch your app once. Once the application opens successfully, re-enable Gatekeeper by typing sudo spctl --master-enable in Terminal to keep your system secure.

A MacBook Pro resting on a desk displaying an active macOS Terminal window and an application error alert on screen.

Frequently Asked Questions (FAQ)

Is it safe to strip the quarantine attribute from downloaded Mac apps?

Stripping the quarantine attribute bypasses Gatekeeper checks for that specific file. You should only use the xattr command on software you downloaded from trusted developer websites or verified open-source repositories.

Why does the damaged app error appear even after reinstalling the app?

When you download a fresh copy of an application using the same browser, macOS attaches the exact same com.apple.quarantine extended attribute flag to the new file bundle, triggering the same Gatekeeper block until stripped.

What is the difference between Gatekeeper and XProtect on macOS?

Gatekeeper checks developer signatures, quarantine flags, and notarization status when an app launches for the first time. XProtect is Apple's built-in background antivirus software that continuously scans files for known malware signatures.

Will disabling Gatekeeper leave my Mac permanently vulnerable?

If you leave Gatekeeper disabled permanently using spctl --master-disable, any downloaded file can run without explicit security warnings. It is best practice to re-enable Gatekeeper immediately after launching your target application.

Did running the xattr quarantine command clear your app error, or did you have to self-sign the binary with codesign? Drop a comment below with your macOS version and let's troubleshoot together!

*

Post a Comment (0)
Previous Post Next Post