If you’ve ever downloaded a Mac application from anywhere but the App Store, you’ve likely encountered Apple’s Gatekeeper. In earlier versions of macOS, you had the option to effectively disable this safety measure and download apps from anywhere, but that setting no longer appears by default.

You can, however, restore this legacy function using a Terminal command. Let’s take a look at how to completely disable Gatekeeper in later versions of macOS.

Why Gatekeeper Is Important

Whenever you launch an app downloaded outside of the App Store for the first time, Gatekeeper either provides a warning or prevents that application from opening. If the developer has had the file checked and notarized by Apple, you’ll have no trouble launching the software. If, however, macOS can’t confirm that the app is free of malware, Gatekeeper steps in to prevent you opening it.

Gatekeeper dialog box saying that Wine cannot be opened.

This useful security measure helps stop you from unwittingly launching malicious software, and you can usually bypass the bouncer when needed. For most of us, the standard Gatekeeper workaround methods are effective, but you may want a little more flexibility in your settings.

Related: What Is GateKeeper and How Does It Protect My Mac?

Tinkering with Apple’s built-in safety features can be risky, and most of us will never need to make any drastic changes. But that doesn’t mean you won’t ever need to. While we don’t recommend disabling Gatekeeper in macOS, we will still show you how to do so below.

Disable Gatekeeper With Terminal

To restore the legacy setting that lets you completely disable Gatekeeper, you’ll need to run a command in Terminal Terminal is macOS’s command line interface, and it’s easy to use once you get familiar with how Terminal works.

To disable Gatekeeper, follow these steps:

  1. Launch Terminal from Applications > Utilities.
  2. Enter the following command:
    sudo spctl --master-disable
  3. Hit Enter and type your admin password.
  4. Hit Enter again.
macOS security and privacy general preferences with Gatekeeper 'Anywhere' option showing.

Now, the Anywhere option should be available under the Allow apps downloaded from section of System Preferences > Security & Privacy > General. From here, you can change the setting to loosen or tighten Gatekeeper security whenever you want. But please remember that sidestepping any of macOS’s built-in safety measures comes with risks.

Enable Gatekeeper With Terminal

If you wish to undo the change and re-enable Gatekeeper, you can, once again, do so with a simple Terminal command.

To enable Gatekeeper, follow these steps:

  1. Launch Terminal from Applications > Utilities.
  2. Enter the following command:
    sudo spctl --master-enable
  3. Hit Enter and enter your admin password if required.
  4. Hit Enter again.

Related: Fun and Cool Mac Terminal Commands to Try

The Anywhere option in System Preferences > Security & Privacy > General should now be unavailable, and only standard Gatekeeper settings will appear.

Check Gatekeeper Status With Terminal

If you’re unsure about the current status of Gatekeeper and wish to double-check that the desired changes have occurred, you can do so with another Terminal command.

To check Gatekeeper status, follow these steps:

  1. Launch Terminal from Applications > Utilities.
  2. Enter the following command:
    spctl --status
  3. Press Enter.
Terminal with Gatekeeper status showing.

Once you enter the command, Terminal will output the current Gatekeeper status. However, checking System Preferences > Security & Privacy > General is usually the simplest way to confirm your settings. If the Anywhere option is missing, you know you have Gatekeeper fully enabled, which is the ideal condition for most of us.

Security Measures in macOS Are Important

Although you can disable some of the built-in macOS security tools, you’ll rarely need to do so. With simple Terminal commands, you can restore Gatekeeper’s legacy setting, fully re-enable the feature, and check the status whenever you want.

Apple’s built-in safety measures are there to help, but sometimes too many restrictions can be stifling. If you do wish to disable an important security feature, you should always seek to understand the tool you’re tinkering with and the potential consequences involved first. But once you know the lay of the land, the informed decision is all yours.