BlueByte
app is damagedWorkaround

macOS: "App is damaged and can't be opened"

By Haneul SeoUpdated August 17, 20263 min

Hi, it's BlueByte. Before you drag that app to the Trash — it's almost certainly not damaged. macOS is refusing to run it because it came from the web unnotarized, and it phrases that as "damaged". Let's confirm that's what's happening, then, only if you trust the source, clear the flag that's blocking it.

What the message really means

Opening a downloaded app fails:

"App" is damaged and can't be opened. You should move it to the Trash.

The app is usually not damaged. macOS Gatekeeper is refusing to run it because it arrived from the internet and is not notarized, and recent macOS versions phrase that refusal as "damaged" rather than the older "unidentified developer" prompt. Because the wording is alarming, people trash working software — the actual issue is a security flag, not corruption.

Why Gatekeeper blocks it

When a file is downloaded, macOS tags it with the com.apple.quarantine extended attribute. Gatekeeper checks that tag on first launch, and if the app is unsigned or not notarized by Apple, it is blocked. There is a second, real possibility to rule out: the download was genuinely incomplete or corrupted, in which case clearing the tag will not help — and on Apple silicon, an Intel-only app that needs Rosetta produces a different but nearby prompt.

Confirm it's quarantine, not real corruption

Don't guess — check whether the quarantine attribute is actually present:

xattr -p com.apple.quarantine /Applications/App.app

If it prints a value, quarantine is the reason. Then confirm the download is intact — compare its size or checksum against the publisher's if they provide one. A size mismatch means re-download, not a Gatekeeper workaround.

Clear the flag — only for software you trust

  1. Confirm you trust the source. This step removes a security check, so do it only for software from a site you trust.

  2. Remove the quarantine attribute from the app:

xattr -dr com.apple.quarantine /Applications/App.app

-r clears it from everything inside the bundle. Replace the path with the app's actual location.

  1. Open the app normally. If macOS still prompts, right-click the app → Open, then confirm — that records your approval for that specific app.

A real case: a GitHub release

You download an open-source tool from its official GitHub releases page, drag it to Applications, and macOS says it is "damaged". You run xattr -p com.apple.quarantine /Applications/Tool.app and it prints a quarantine value, confirming Gatekeeper, not corruption. Because you trust the GitHub release (and the checksum on the release page matches your download), you run xattr -dr com.apple.quarantine /Applications/Tool.app. The app opens on the next launch, and xattr -p now returns nothing.

Confirm the flag is gone

Launch the app; it should open without the warning. Re-running the xattr -p command should now return nothing, confirming the quarantine flag is gone — not just that the app happened to open once.

Keep it from recurring

Prefer notarized builds and the Mac App Store where possible, and when you do install from the web, keep to publishers you can verify. For software you distribute yourself, notarizing it with Apple removes this prompt for your users entirely.

How this differs from a Rosetta or notarization prompt

This is Gatekeeper, not an architecture problem. On Apple silicon, an Intel-only app instead prompts to install Rosetta — a different message. And "app can't be opened because Apple cannot check it for malicious software" is the milder, notarization-pending variant, cleared with the same right-click → Open. When it says "damaged", check for the quarantine attribute first.

Related questions

Is the app actually damaged?

Usually not. The message is Gatekeeper's response to an unsigned or non-notarized app from the internet. If a re-download and checksum match, the file is fine.

Is removing the quarantine attribute safe?

It bypasses a macOS security check, so do it only for software from a source you trust. For anything unknown, leave the protection in place.

Right-click → Open did nothing.

On stricter macOS versions the 'damaged' variant does not offer the Open override; use the xattr command to remove the quarantine attribute instead.

It still won't open after removing quarantine.

The download may be genuinely incomplete, or the app needs Rosetta on Apple silicon. Re-download and verify the checksum, and check for a separate Rosetta prompt.

Can I stop macOS quarantining downloads entirely?

You can lower Gatekeeper via spctl, but that weakens protection system-wide. Removing the attribute per trusted app is far safer than disabling the check.

References

Haneul Seo

Infrastructure engineer · 10+ years running Linux fleets

More in this category

Start request repeated too quicklyFixed

systemd: Start request repeated too quickly

systemd refuses to start a unit that was started more than StartLimitBurst times (default 5) within StartLimitIntervalSec (default 10s), and Restart= counts against that limit. With the 100 ms default RestartSec a crashing service burns all five attempts in under a second. Find the real crash in the journal, fix it, run reset-failed, and give restarts room with RestartSec.

systemd
Too many authentication failuresFixed

SSH: Received disconnect ... Too many authentication failures

Your agent is offering more keys than the server will let you try. Every public key sshd looks at burns one of the MaxAuthTries attempts — six by default, often three on a hardened host — so the right key never gets its turn and the server hangs up before you type anything. IdentitiesOnly=yes with an explicit IdentityFile pins the connection to one key and the attempt count drops to one.

OpenSSH
1722Fixed

Active Directory: replication fails with error 1722, The RPC server is unavailable

RPC reports 1722 (0x6ba, RPC_S_SERVER_UNAVAILABLE) when a lower layer fails to connect, so the real fault is almost never RPC itself — it is DNS, a blocked port, or a host-side setting on one of the two domain controllers. repadmin tells you which partner is failing, dcdiag /test:dns rules out name resolution, and Test-NetConnection plus the dynamic port range settle the firewall question. The most common miss is a rule that allows TCP 135 but not 49152–65535.

Windows Server Active Directory
Windows Server RDSFixed

Windows Server RDS: The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license

The 120-day RD Licensing grace period ended and the session host has no usable license server, so it refuses sessions. GetGracePeriodDays returning DaysLeft 0 and an empty SpecifiedLSList confirm it in seconds. The fix is a real, activated license server with CALs that are new enough for the host — a 2019 CAL cannot serve a 2022 session host — configured through the deployment or the Licensing policies, plus RPC ports open between the two.

Windows Server RDS
0x80070035 / Event ID 31017Workaround

Windows 11: "Your organization's security policies block unauthenticated guest access" when opening a NAS share (0x80070035)

The SMB client on Windows 10 Enterprise/Education/Pro for Workstations, Windows 11 Pro and Windows Server 2019+ refuses guest logons by default, and Windows 11 24H2 Enterprise/Pro/Education also requires SMB signing, which guest sessions can't do. A NAS share that only offers guest access therefore fails with the 'block unauthenticated guest access' dialog, Error code 0x80070035, or System error 3227320323, and Event ID 31017 'Rejected an insecure guest logon' lands in the SmbClient/Security log. The fix Microsoft recommends is a real account on the NAS and signing support in its firmware; Set-SmbClientConfiguration -EnableInsecureGuestLogons $true (plus -RequireSecuritySignature $false on 24H2) is the escape hatch, and it costs you signing and encryption on that client.

Windows (SMB client)
E: Could not get lock /var/lib/dpkg/lock-frontendFixed

Ubuntu/Debian: E: Could not get lock /var/lib/dpkg/lock-frontend — who holds it and how to wait for it

Another package manager, usually Ubuntu's unattended-upgrades fired by a persistent systemd timer at boot, holds the dpkg frontend lock while your apt-get runs. apt-get gives up at once while apt waits because Ubuntu ships binary::apt::DPkg::Lock::Timeout "120" for the apt binary only. Read the PID from the message, let the run finish or pass -o DPkg::Lock::Timeout=<seconds> to apt-get, run dpkg --configure -a only after a genuinely interrupted run, and never delete the lock file: it is an fcntl lock the kernel releases when the holder exits.

APT (Ubuntu/Debian)