Quick answer

Open Terminal and run sudo spctl --master-disable, then choose Anywhere in System Settings › Privacy & Security. Turn it back on with sudo spctl --master-enable. Gatekeeper Toggler does the same with one switch.

Gatekeeper is the macOS security check that decides whether an app downloaded outside the Mac App Store may run. If an app is unsigned, not notarized or from an unidentified developer, Gatekeeper blocks it. That is usually the right call, but sometimes you need to run a build you trust, such as a test version or a tool Apple has not notarized.

Try the safer option first. If only one app is blocked, open that single app by Control-clicking it and choosing Open. Gatekeeper stays on for everything else.

Turn Gatekeeper off with Terminal

How to
  1. Open Terminal.
  2. Run sudo spctl --master-disable and enter your administrator password.
  3. Open System Settings › Privacy & Security, scroll to Security, and choose Anywhere if it is offered.
  4. Open or install the app that was blocked.
  5. Turn it back on with sudo spctl --master-enable.
spctl --status
sudo spctl --master-disable
sudo spctl --master-enable

spctl --status tells you whether Gatekeeper's assessments are currently enabled or disabled.

Turn it off with one switch

Gatekeeper Toggler flips Gatekeeper on or off from a single switch. A green padlock shows when it is on, each change asks for your administrator password, and it simply runs Apple's own spctl commands for you. It is free and runs on macOS 11 Big Sur or later.

Be careful

With Gatekeeper off, any app can run, including a malicious one. Turn protection back on as soon as you are done. For background on another macOS protection that often comes up alongside this one, see What is SIP?

Frequently asked questions

Is it safe to disable Gatekeeper?
Turning it off does not damage macOS, but it lets any app run, including a malicious one. Turn it off only for software you trust and switch it back on afterwards.
How do I check if Gatekeeper is on?
Run spctl --status in Terminal. It reports whether assessments are enabled or disabled.
Is there a safer way to open one blocked app?
Yes. Control-click the app, choose Open and confirm. That allows only that app and leaves Gatekeeper on.
Why is the Anywhere option missing?
Recent versions of macOS hide it. Running sudo spctl --master-disable makes it appear in Privacy & Security.