Gatekeeper is the security layer in macOS that blocks apps from unidentified developers or from outside the App Store. Turning it off permanently stops macOS from checking the Gatekeeper status of downloaded apps, so you can run any app without the “cannot be opened because the developer cannot be verified” warning. This guide shows you how to disable Gatekeeper entirely using Terminal, and how to re-enable it later if needed. Before you start, make sure you have an administrator account and know your admin password.
What You’ll Need
- An administrator user account on the Mac
- Your admin password (the one you use to log in)
- Access to the Terminal app (found in /Applications/Utilities/)
- Basic comfort with typing commands
Step-by-Step
- Back up your Mac (optional but recommended). Disabling Gatekeeper reduces security. Use Time Machine or your preferred backup method before making system-level changes.
- Open Terminal. Go to Finder > Applications > Utilities > Terminal. Alternatively, press Command+Space, type “Terminal”, and press Return.
- Disable Gatekeeper. Type the following command exactly and press Return:
sudo spctl --master-disable
You will be prompted for your password. Type it (characters won’t appear as you type) and press Return. - Verify the change. After the command runs, open System Settings (or System Preferences on older macOS) and go to Privacy & Security (or Security & Privacy). Scroll down to the “Allow apps downloaded from” section. You should now see an option “Anywhere” selected. If you see it, Gatekeeper is off.
- Test with a blocked app. Try opening an app that was previously blocked. It should launch without the Gatekeeper warning.
- Re-enable Gatekeeper (when you want to). To turn it back on, run this command in Terminal:
sudo spctl --master-enable
Then check System Settings again; the “Anywhere” option should disappear.
Common Mistakes
- Typing the command wrong. The command is case-sensitive. Use lowercase and the exact hyphens. A missing space or wrong letter will produce an error.
- Forgetting to use
sudo. Withoutsudo, you’ll get “operation not permitted” or similar. Always prefix withsudo. - Entering the wrong password. Terminal doesn’t show characters, so it’s easy to mistype. If you get “Sorry, try again,” re-enter your password carefully.
- Looking in the wrong settings pane. On macOS Ventura and later, it’s System Settings > Privacy & Security. On older versions, it’s System Preferences > Security & Privacy > General tab.
- Assuming the change is permanent. macOS updates may reset Gatekeeper settings. After a major macOS update, check if “Anywhere” is still there.
Tips
- Use the “Open Anyway” method for one-time overrides. If you only need to run a single app, right-click (or Control-click) the app and select Open. This bypasses Gatekeeper for that app without disabling it globally.
- Remember to re-enable after testing. Leaving Gatekeeper off permanently exposes your Mac to malware. Turn it back on when you’re done.
- Use a separate admin account for daily use. If you must keep Gatekeeper off, consider using a standard (non-admin) account for everyday tasks to reduce risk.
- Check quarantine attributes. If an app still won’t open after disabling Gatekeeper, the file may have a quarantine attribute. Remove it with
xattr -d com.apple.quarantine /path/to/app(replace the path). - Keep your Mac updated. Even with Gatekeeper off, install security updates to protect against other vulnerabilities.
Troubleshooting
The “Anywhere” option doesn’t appear. This usually means the command didn’t execute. Re-run sudo spctl --master-disable and ensure you see no error. If it still fails, check that you’re using the exact command and that your user has admin privileges.
Command returns “spctl: command not found”. This is rare but may happen if Terminal can’t find the system tool. Try using the full path: /usr/sbin/spctl --master-disable.
Apps still blocked after disabling. Gatekeeper may not be the only blocker. Check if the app is quarantined (see Tips). Also, some apps have their own security checks; try right-clicking and selecting Open the first time.
You forgot your admin password. You cannot disable Gatekeeper without it. Reset your password using Apple ID or another admin account, then retry.
macOS update re-enabled Gatekeeper. After major updates, Apple may reset security settings. Simply re-run the disable command.
Frequently Asked Questions
Is it safe to turn off Gatekeeper? No, it’s not safe. Gatekeeper is a security layer that prevents malicious apps from running. Turning it off removes that protection. Only do it temporarily and re-enable as soon as possible.
Will this work on all Mac models? Yes, the spctl command works on all Macs running macOS 10.7 or later, including Intel and Apple Silicon models.
Do I need to restart after disabling? No, the change takes effect immediately. You don’t need to restart your Mac.
Can I turn off Gatekeeper for just one app? Yes, use the right-click > Open method or remove the quarantine attribute. That’s safer than disabling globally.
What does “Anywhere” mean in Security settings? It means macOS will allow apps from any source, including unidentified developers, without checking Gatekeeper.
How do I know if Gatekeeper is off? Check System Settings > Privacy & Security. If “Anywhere” is selected, it’s off. Alternatively, run spctl --status in Terminal; it will say “assessments disabled”.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Stop Chrome Auto-Opening on Windows Startup
- Snapchat Security: 12 Tips to Lock Down Your Account
- Missing Comma on iPhone Keyboard: Fix & Where It Went
- Get Pixel Weather & Screenshot Apps on Any Android
- Other Storage on Android: What It Is & How to Clean It
- Facebook Messenger Games: How to Play With Friends