Disabling and Enabling System Integrity Protection
System Integrity Protection (SIP) in macOS protects the entire system by preventing the execution of unauthorized code. The system automatically authorizes apps that the user downloads from the App Store. The system also authorizes apps that a developer notarizes and distributes directly to users. The system prevents the launching of all other apps by default.
During development, it may be necessary for you to disable SIP temporarily to install and test your code. You don’t need to disable SIP to run and debug apps from Xcode, but you might need to disable it to install system extensions, such as DriverKit drivers.
To disable SIP, do the following:
Restart your computer in Recovery mode.
Launch Terminal from the Utilities menu.
Run the command
csrutil disable
.Restart your computer.
Remove a non-removable MDM profile from macOS without a complete wipe
Open the integrated terminal and type:
cd /var/db/ConfigurationProfiles
sudo rm -rf *
mkdir Settings
touch Settings/.profilesAreInstalled
Enable System Integrity Protection
To reenable SIP, do the following:
Restart your computer in Recovery mode.
Launch Terminal from the Utilities menu.
Run the command
csrutil enable
.Restart your computer.
Warning
Disable SIP only temporarily to perform necessary tasks, and reenable it as soon as possible. Failure to reenable SIP when you are done testing leaves your computer vulnerable to malicious code.