How to kill a System Extension or Network Extension?

Viewed 5107

So I'm building a macOS app with a Network Extension in Swift. After some tests, the extension remains as a process in the system. I can stop and also I can kill the app but I cannot stop, kill or unload the Network Extension. The Network Extension emerges again and again.

I restarted macOS but the Network Extension is still there as a process. How can I completely remove it from the System?

1 Answers

You should be able to remove it by one of the following 2 methods:

  • Delete the host application from /Applications using the Finder. This should prompt you that it will remove any associated system extensions. (May not work if you've disabled the requirement for host apps residing in /Applications on your system. This is done using the systemextensionsctl developer on terminal command)
  • Submit an extension deactivation request created using the +deactivationRequestForExtension:queue: method on OSSystemExtensionRequest. This is the complement of the activation request you used to install the extension in the first place.
Related