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.
Contents:
- 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 do the following:
- Open System Settings.
- Click Privacy & Security in the sidebar.
- Scroll down and find the FileVault section.
- Check the status whether it’s turned on or turned off.
A guide for earlier versions of macOS:
- Go to System Preferences
- Click Security & Privacy.
- Switch to the FireVault tab.
Remove kernel extensions when FileVault is disabled
- 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.
- In the Menu bar click Utilities → Terminal.
- Type the following command and click Enter:
cd
[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.
- Then type this command:
rm -rf
[extension name=””][/extension] - 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:
csrutil disable
- Press the Return key to disable System Integrity Protection.
- Restart your Mac in the usual way.
- Find the kext file in Finder and remove it from there.
- Empty your Trash bin.
- 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
- Again restart your Mac.
After these steps, the kext file will finally be completely removed.