Disable Gatekeeper to Allow Applications from Anywhere in macOS Sierra

Background Info

Recently I had to wipe my macOS clean, and therefore lost all my customisations.

Therefore, when I needed to install an application from a colleague, I got the usual permission issues.


I needed the Anywhere option to appear in my Security & Privacy screen. For that to happen, I had to disable Gatekeeper entirely, so I opened a Terminal session and used the following command:

$ sudo spctl --master-disable

I was able to check the change was successfully performed by checking the status flag:

$ spctl --status
assessments disabled

As can be seen in the screenshot below,

, my full control over which apps are allowed is now back in my hands.

Reenable Gatekeeper

If you ever need to turn Gatekeeper back on, it's as easy as executing:

$ sudo spctl --master-enable