Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to delete com.kaspersky.kav.sysext.systemextension on macOS Monterey?

I am trying to completely remove Kaspersky Anti-Virus. I am down to one file that I can't delete - com.kaspersky.kav.sysext.systemextension. How can I get rid of it?


It shows up as a system extension under Privacy -> Full Disk Access. I try to remove it and it keeps coming back. It also shows up in the Activity Monitor Process List and reappears no matter how many times I quit the process.


I have also spent about an hour trying to delete the underlying file including:

  • Finder Delete
  • Finder Command-Delete

I always get the error - The operation can’t be completed because you don’t have permission to access some of the items.


I then tried to delete from Terminal using:

sudo rm -rf Contents

and it get ...

rm: Contents/CodeResources: Operation not permitted


rm: Contents/_CodeSignature/CodeResources: Operation not permitted


rm: Contents/_CodeSignature: Operation not permitted


rm: Contents/MacOS/com.kaspersky.kav.sysext: Operation not permitted


rm: Contents/MacOS: Operation not permitted


rm: Contents/embedded.provisionprofile: Operation not permitted


rm: Contents/Info.plist: Operation not permitted


rm: Contents: Operation not permitted

Mac mini, macOS 12.3

Posted on Mar 26, 2022 1:07 PM

Reply

Similar questions

16 replies
Sort By: 

Mar 28, 2022 10:08 AM in response to James Brickley

Thanks for all of the great ideas. At this point:

  1. I tried the Kaspersky Internet Security Uninstaller Utilities several times and it did not remove the file
  2. I installed and tried to uninstall Kaspersky Internet Security and it did not remove the file and it left behind about 10 files that I was able to find and Move to Trash -- so not much of an Uninstall process
  3. I opened a ticked with Kaspersky and sent them a bunch of diagnostic information - so I am going to wait for their response before proceeding with the ideas suggested here


If I do have to turn off system protections, I will do backups, re-enable right away etc.


Thanks for all the help. Bottom line - do not install Kaspersky anywhere, ever



Reply

Mar 26, 2022 1:16 PM in response to diesel_dad

I suggest running an EtreCheck report. It should locate any "orphan" Kaspersky files on your Mac so we know where (potentially) this one is located.


Ref: Using EtreCheck to Troubleshoot Potential… - Apple Community


Alternatively, kernel extension files would be located in any of the following "folders" on your Mac:

  • /Library/Extensions
  • /System/Library/Extensions


Reply

Mar 26, 2022 5:45 PM in response to diesel_dad

You are not going to be able to remove this system extension without some tricky, low-level changes and Terminal commands. These actions can be dangerous and we are not allowed to post instructions here in the forums.


I recommend you contact Apple Support Directly.

Reply

Mar 26, 2022 6:18 PM in response to etresoft

I have contacted Apple Support. Their brilliant answer was to reformat the drive and install MacOS from scratch as being the only way to remove the file. I asked them to send me something where it said that removing the file was not possible and they said that they could not.


I grew up as a Unix System programmer, so I am comfortable with using Terminal commands but there is something protecting this file that I can't seem to figure out.


Reply

Mar 26, 2022 7:37 PM in response to diesel_dad

diesel_dad wrote:

I have contacted Apple Support. Their brilliant answer was to reformat the drive and install MacOS from scratch as being the only way to remove the file. I asked them to send me something where it said that removing the file was not possible and they said that they could not.

That’s the easy answer, at least as far as they are concerned.

I grew up as a Unix System programmer, so I am comfortable with using Terminal commands but there is something protecting this file that I can't seem to figure out.

It is System Integrity Protection. Unfortunately, the rules of this forum do not allow me to explain how to disable it.


The problem here is that you tried to remove the file yourself. It doesn’t matter how much experience you have. You don’t have the correct entitlements from Apple. The correct answer would have been to use the built-in Kaspersky uninstallation procedure or instructions. But that’s not possible if you’ve already deleted the software. I’m not going to recommend reinstalling either because that might be illegal now. According to the US government, Kaspersky is “an unacceptable risk to the national security of the United States or the security and safety of United States persons”.


If you can find instructions elsewhere, just make sure to re-enable System Integrity Protection when you’re done.

Reply

Mar 26, 2022 8:33 PM in response to diesel_dad

diesel_dad wrote:

I have contacted Apple Support. Their brilliant answer was to reformat the drive and install MacOS from scratch as being the only way to remove the file.

Given what Etresoft has indicated, it seems that only a certified installer/uninstaller can access some of these files, apparently including the one you want to remove. Perhaps Kaspersky has such an uninstaller, but if Kaspersky itself is not trustworthy, would I use their uninstaller? I have actually done a full disk erase and reinstall in the past, it is not that hard and it will result in a clean operating system, not a bad thing. Make sure you have at least two backups, preferably two different types (e.g. Time Machine, clone, cloud-based, etc.) that you have tested, and when you migrate your files back make sure you migrate only user accounts and files, nothing else, so you don't bring that file back. By the way, there could be more than just that one file that you know about, in which case you are better off with the clean reinstall anyway, possibly.

Reply

Mar 27, 2022 2:06 AM in response to diesel_dad

EDITED


As All others have mentioned regarding the Terminal command line would be required in this instance.


If willing to try this Safe Application as last ditch effort and may or may not work.


Suggest restarting in Safe Mode to perform this action.


Doing a Safe Mode boot should insure the extension does not load and make it easier for the FAF Application to find the file location.


Attempt to Drag and Drop the extension to Trash and Empty Trash.


Use the search words associate with the Offending Application


Find Any File (FAF)


Reply

Mar 27, 2022 6:47 AM in response to diesel_dad

diesel_dad wrote:

I have tried the Kaspersky un-installer several times and I have a ticket open with Kaspersky support. I'll wait for their response but at least now I know why I don't have the right privileges to delete.

That’s unfortunate. The manual uninstallation process is well-known. I just can’t mention it here.


Even an erase and reinstall might not help. If you restore from backup, you could restore the system extension.

Reply

Mar 27, 2022 11:22 AM in response to diesel_dad

You'll need to search online on how to remove a system extension. There are ways to do it.


As previously mentioned, without disabling security features and using somewhat arcane command line tools intended for developers, your option would be to backup your data and erase the internal drive entirely and install a clean macOS Monterey then restore your data.


[Edited by Moderator]




Reply

Apr 7, 2022 7:02 AM in response to diesel_dad

Hi - I finally decided to erase the Mac Mini and start from scratch. I did not restore anything from Time Machine and will re-install one program at a time. Almost all of my files were in iCloud or external drives, so nothing lost there. Re-installing the programs I actually use from supplier downloads. But at least Kaspersky is gone.


I did open an incident with Kaspersky support and their best suggestion so far was the "sudo rm -rf ..." approach that didn't work. I have sent them that and will post any other clever ideas they provide.


So, never install their Kaspersky malware ...

Reply

Apr 7, 2022 7:20 AM in response to diesel_dad

Thank you for sharing the course of action taken.


Too bad the real method to the remove the extension can not be openly discussed here.


It may have saved a lot of work on your part instead of the Wipe and Install the OS from scratch.

Reply

Apr 7, 2022 7:26 AM in response to diesel_dad

diesel_dad wrote:

So, never install their Kaspersky malware ...

To be honest, this particular problem is common to many Mac security products. My standard advice to only use official uninstallers or uninstallation instructions provided directly by the developer is becoming more and more useless as those official uninstallers often don't work.


These are security apps. They are supposed to protect us from the most dangerous, state-sponsored, zero-day hacking and ransomware attacks. Yet they can't even figure out how to properly uninstall their own software.

Reply

How to delete com.kaspersky.kav.sysext.systemextension on macOS Monterey?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.