Enable or Disable Gatekeeper with spctl --master

Temporarily turn app assessment off to install unsigned software, then turn it back on.

macOSGatekeeperspctlsecurityHigh risk
Run sudo spctl --master-disable to allow all apps, install what you need, then immediately run sudo spctl --master-enable.

01Command

Command
$ sudo spctl --master-disable   # re-enable with: sudo spctl --master-enable

02What it does

Gatekeeper is macOS's check that apps come from identified developers; --master-disable switches the policy to 'Anywhere' so unsigned apps launch, and --master-enable restores the default protection. On recent macOS the option only appears in System Settings while disabled. Prefer the narrower alternative — right-click the blocked app and choose Open — which exempts a single app instead of the whole system.

03Risk

RiskHigh risk
RequirementsAdministrator password for sudo.
!Warning: This disables a core security layer for every app, not just the one you want — re-enable it immediately and never install software you don't trust. Malware routinely relies on users leaving Gatekeeper off.

04Undo

Undo
$ sudo spctl --master-enable

05Sources

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions