When you are removing applications using the uninstaller from Nektony, you may face an error with deleting some service files and folders.
This happens because specific applications, mostly antiviruses, can create kernel extensions which are able to protect themselves and some related files from being removed. Kext files are usually stored in the Extensions folder is deep subfolders. If you try to remove such a file to Trash, you will face a situation when Finder ignores the removal command. So in this article, we are going to explain how to remove the kernel extensions.
- Remove kernel extensions when FileVault is disabled.
- Remove kernel extensions when FileVault is enabled.
To check whether the FileVault option is turned on or turned off go to System Preferences → Security & Privacy → FireVault.
Remove kernel extensions when FileVault is disabled
1. First, write down the path of the kernel file. Then restart your Mac and press Command+R key shortcut while the reboot is in progress. You will see an unusual startup window – this is the recovery mode.
2. In the Menu bar click Utilities → Terminal.
3. Type the following command and click Enter:
[the path=”” of=”” the=”” kernel=”” fil=””][/the]
If there is a space sign in the path name, you should replace it with the backslash sign.
4. Then type this command:
5. The last step is to restart your Mac.
Remove kernel extensions when FileVault is enabled
When the FileVault is enabled on your Mac and your disk is encrypted, your system will not allow you to remove any kext file from your disk using Terminal in the recovery mode. In this case, you will have to disable SIP and remove a kext file manually:
- Repeat the first two steps from the text above and go to the recovery mode → Terminal.
- Type in Terminal the next command:
- Press the Return key to disable System Integrity Protection.
- Restart your Mac in the usual way.
5. Find the kext file in Finder and remove it from there.
6. Then re-enable the System Integrity Protection again. For this, again restart your Mac → use Command+R shortcut → open Terminal and this time type the command csrutil enable
7. Again restart your Mac.
After these steps, the kext file will finally be completely removed.