How to stop taskgated on Sierra? When I just sudo pkill it:

sudo pkill taskgated


In syslog:

Apr 17 12:08:46 genesis com.apple.xpc.launchd[1] (com.apple.taskgated[88619]) &lt;Notice&gt;: Service exited due to signal: Terminated: 15 sent by pkill[90814]


However it automatically restarts:

ps aux | grep taskgated
root             90981   0.0  0.0  2462316   1668   ??  Ss   12:08PM   0:00.01 /usr/libexec/taskgated -s


Also note, that using launchctl is also not the way to do it:

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.taskgated*.plist
/System/Library/LaunchDaemons/com.apple.taskgated-helper.plist: Operation not permitted while System Integrity Protection is engaged
/System/Library/LaunchDaemons/com.apple.taskgated.plist: Operation not permitted while System Integrity Protection is engaged
Launchd is keeping the process alive. You need to run

$ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.taskgated*.plist


to unload the daemon. To load it again, run:

$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.taskgated*.plist