SMJobRemove succeeds, but plist and helper tool not deleted

后端 未结 2 526
情深已故
情深已故 2020-12-11 06:25

I\'m trying to remove a privileged helper tool installed via SMJobBless, I\'m getting a positive return value and no errors, yet the files at /Library/Privilege

相关标签:
2条回答
  • 2020-12-11 06:58

    Thanks jatoben, that thread had the answer I was looking for.

    As suspected you do have to remove the files yourself or use the following: (Taken from Apple dev forums:)

    SMJobRemove is the equivalent of "launchctl remove". That is, it removes the job from launchd but has no effect on the disk at all. Thus the job will get reloaded the next time you start up. To get around that you have to either remove the plist yourself or by fork/exec'ing "launchctl unload -w".

    0 讨论(0)
  • 2020-12-11 07:07

    Have you seen https://github.com/brenwell/SMJobBless-Demo/blob/master/Uninstall.sh? It was very helpful for me.

    0 讨论(0)
提交回复
热议问题