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.
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.
Open Terminal on your Mac (press Command + Spacebar, type
Terminal, and hit Return).Type the following command, ensuring you leave a space at the end:
sudo xattr -rd com.apple.quarantineOpen your Applications folder in Finder.
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).Press Return, enter your Mac administrator password when prompted, and press Return again (characters will not display on screen while typing).
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.
Open Finder and navigate to your Applications folder.
Right-click (or Control-click) the application icon and select Open from the context menu.
A security dialog box will pop up asking for confirmation.
Click the Open button in the pop-up window to create a permanent security exception for that specific app.
Reviewing the
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.
Open Terminal on your Mac.
Type the following code-signing command, making sure to leave a space after
force:codesign --force --deep --sign -Drag your target app from the Applications folder into the Terminal window to complete the file path.
Press Return and enter your administrator password if requested.
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.
Open Terminal.
Type
sudo spctl --master-disableand press Return.Enter your administrator password and hit Return.
Open System Settings > Privacy & Security, scroll down to the Security section, and ensure Anywhere is selected under "Allow applications downloaded from".
Launch your app once. Once the application opens successfully, re-enable Gatekeeper by typing
sudo spctl --master-enablein Terminal to keep your system secure.
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.
.jpg)
