Fix Mac App Damaged Error: Open Anyway Guide
In this article
The "App is Damaged" or "can't be opened" error on macOS occurs because Apple's Gatekeeper security feature blocks applications that are not notarized by Apple or do not match their expected code signature. This usually happens with older software, apps downloaded outside the Mac App Store, or files corrupted during download. The most effective and immediate solution is to use the Terminal command xattr to remove the quarantine attribute from the application file, allowing macOS to trust and launch it.
What You'll Need
- A Mac running macOS (this guide applies to macOS Catalina, Big Sur, Monterey, Ventura, Sonoma, and Sequoia).
- Administrator privileges on your user account.
- The Terminal app, located in Applications > Utilities.
- The specific application file causing the error.
Note: Menu labels may differ slightly depending on your macOS version and language settings. If you are unsure about the exact path, describe the step generically.
Step-by-Step
- Locate the Application: Find the app that is showing the error. It is typically in your
Applicationsfolder, but could also be on your Desktop or in a Downloads folder. Note the exact name of the application bundle (e.g.,AppName.app). - Open Terminal: Press
Command + Spaceto open Spotlight Search. TypeTerminaland press Enter. Alternatively, navigate toApplications>Utilities>Terminal. - Type the Command Prefix: In the Terminal window, type the following text exactly as shown, followed by a single space:
xattr -d com.apple.quarantine - Add the App Path: There are two ways to add the path to the command:
- Drag and Drop (Recommended): Click inside the Terminal window where your cursor is blinking. Then, click and drag the application icon from Finder directly into the Terminal window. This automatically fills in the correct file path and handles spaces in filenames correctly. Ensure there is a space between the word
quarantineand the file path. - Manual Typing: If you prefer typing, enter the full path to the app. For apps in the Applications folder, the path usually looks like this:
/Applications/AppName.app. ReplaceAppNamewith the actual name of the app.
- Drag and Drop (Recommended): Click inside the Terminal window where your cursor is blinking. Then, click and drag the application icon from Finder directly into the Terminal window. This automatically fills in the correct file path and handles spaces in filenames correctly. Ensure there is a space between the word
- Execute the Command: Once the line in Terminal looks like
xattr -d com.apple.quarantine /Applications/AppName.app, press theEnterkey. If the command is successful, Terminal will return to a new prompt line without displaying any error messages. This indicates the quarantine flag has been removed. - Launch the App: Return to Finder and double-click the application again. The "Damaged" error should no longer appear, and the app should launch normally.
Common Mistakes
- Missing the Trailing Space: A very common error is forgetting the space after the word
quarantine. If you forget the space, Terminal will try to interpret the file path as part of the command syntax, resulting in a "command not found" or similar error. Always ensure there is a space before the file path. - Typing the Wrong Path: Manually typing the path can lead to typos. If the path is incorrect, Terminal will report that the file does not exist. Using the drag-and-drop method eliminates this risk entirely.
- Attempting to Open Before Fixing: Some users try to right-click and select "Open" multiple times before using Terminal. While right-clicking > Open is a valid alternative for some apps, if Gatekeeper has already flagged the app as damaged due to code signature issues, the Terminal fix is often required first.
- Ignoring Case Sensitivity: macOS file paths are case-sensitive. Ensure that the capitalization of the app name in the Terminal command matches the actual filename in Finder exactly.
Tips
- Verify the Source: Only remove the quarantine attribute from apps you trust. This command effectively tells macOS to ignore its safety checks for that specific file. Never use this on software downloaded from untrusted or suspicious websites.
- Check for Updates: Before bypassing security, check the developer's website for an updated version of the app. Developers often re-sign their apps to comply with newer macOS security standards, which resolves the issue natively.
- Use Right-Click for Minor Issues: If the error message simply says "App is damaged and can't be opened" but doesn't mention code signing errors, try holding the
Controlkey while clicking the app icon, then selectingOpen. This sometimes bypasses the warning for less severe cases. - Backup Important Data: While removing the quarantine attribute is generally safe, always ensure you have backups of important data before modifying system-level attributes or reinstalling applications.
Troubleshooting
If the above steps do not resolve the issue, the problem may be deeper than a simple quarantine flag. Here is what to do when the standard fix fails:
1. Check Code Signature Integrity
If the app is truly corrupted, removing the quarantine flag will not help. Open Terminal and run the following command to verify the app's integrity:
codesign --verify --verbose /Applications/AppName.app
Replace AppName.app with your app's path. If this returns errors about invalid signatures or missing resources, the app file itself is broken. You must delete the app and download a fresh copy from the official source.
2. Clear System Cache
Sometimes, macOS caches old security states. Restart your Mac completely. After rebooting, try opening the app again. If the issue persists, you can try clearing the NVRAM/PRAM by restarting your Mac and immediately pressing and holding Option + Command + P + R for about 20 seconds. This resets low-level settings that might be interfering with app launches.
3. Reinstall the Application
If verification fails, delete the application from your Applications folder (move it to Trash) and empty the Trash. Then, download the latest version from the developer's official website. Ensure you are downloading the correct version for your macOS architecture (Intel vs. Apple Silicon).
4. Check Disk Permissions
In rare cases, file permission issues can cause this error. Open Terminal and run:
diskutil repairpermissions /
Note: This command may take several minutes to complete. After it finishes, restart your Mac and try launching the app again.
Frequently Asked Questions
Is it safe to use xattr to remove quarantine?
Yes, it is safe provided you only apply it to applications you trust and have verified come from legitimate sources. It removes the "downloaded from internet" tag, not the app's functionality.
Why did my previously working app suddenly show this error?
This often happens after a macOS update. Newer versions of macOS enforce stricter security policies, which can cause previously trusted apps to be flagged if they haven't been re-signed by the developer recently.
Can I disable Gatekeeper completely to avoid this?
While technically possible via Terminal commands, it is strongly discouraged. Disabling Gatekeeper exposes your entire system to malware and unsigned software risks. Fix individual apps instead.
Does this work for apps installed via Homebrew?
Homebrew-managed apps are usually handled differently. If you encounter this with Homebrew, try running brew reinstall [formula] or checking if the app needs to be moved to the /Applications folder manually after installation.
What if the app still won't open after using xattr?
If the app still fails, the binary is likely corrupted or incompatible with your current macOS version. You must obtain a clean, updated version of the application from the developer.
Will this fix affect my other apps?
No. The xattr command only affects the specific file path you provide. It does not change global system settings or impact other applications.