Quick Links

Have you received an error message that says an app "is damaged and can't be opened" and "you should move it to the Bin" with a handy button for doing so? If you trust the file, you can get around this with a simple Terminal command.

How to Move Trusted Files Out of Quarantine

A Mac will sometimes encounter a file it doesn't trust and report that the file is damaged, and should be moved to the bin. You would be forgiven for listening to macOS and going with it, but much of the time there's nothing wrong with the app. Instead, macOS has quarantined the app since it suspects foul play.

File is Damaged Error on macOS

Assuming you trust the origin of the app that you have downloaded (for example, a piece of software directly from a developer you trust) you can attempt to ignore the warning and open the file anyway.

To do this, open a new Terminal window and type (or paste the following command):

xattr -d com.apple.quarantine /path/to/app.app

You'll need to replace /path/to/app.app with the target location of the file you want to release from quarantine. One easy way of doing this is to drag the file into the Terminal window, right after the initial command.

Use Terminal to remove file from quarantine

You won't receive any feedback once the command has been executed, but with a bit of luck, the file you tried to open will no longer throw an error and should just work like normal.

Cook Serve Delicious 2 app

Why Does This Happen?

macOS takes an overzealous approach to security, with features like Gatekeeper attempting to limit software to the Mac App Store and System Integrity Protection preventing third-party apps from tampering with sensitive parts of the system or injecting code into Apple apps like Finder and Safari.

This quarantine process only applies to certain APP files that are contained within a ZIP archive that has been downloaded from the internet. Files that have been shared via a USB drive or local network location are not subject to the same protections.

Sometimes the app may legitimately be "damaged" in that it won't work, and the Terminal command above won't do anything to resolve that. In that case, you're going to need to find another source for your app.

Always Exercise Caution

Malware is more common than it once was on macOS, which means you should always be vigilant about what software you download and choose to run. Common sense dictates that you should avoid files of unknown origin, but even so-called "legitimate" files can be compromised as happened with the trusted Transmission BitTorrent client back in 2016.

Related: How to Protect Your Mac from Malware