Contribute
Register

macOS Catalina Cleanup: Remove Kexts From /Library/Extensions and Recache

Theres a way to fix this but first you got to know what kext you accidentally deleted, copy it back into that folder using the uefi shell, and delete whatever folder that holds the kext cache to force a rebuild upon the next rebuild. Just deleting the cache may be all you need. Not sure what the folder location is right now. Someone here told me details last month and have to search my history to tell you more later after morning coffee.

Here it is: https://www.tonymacx86.com/threads/solved-how-to-rebuild-kextcache.224241/post-2099275

Hi, thanks for your help.

This is my first time really using the terminal with all its command so please bear with me here.

I did what you said and also what was said in the other post. I navigated the terminal in single user mode (is that the UEFI shell?) to my library. I deleted the Caches folder there, then shutdown. I booted and the progress bar got to 100%, stayed there for a while, then the screen turned off while the machine remained on (which it didn't do before, it just stayed at the loading bar forever)

While I was navigating the directories and such, I found the .Trash folder which I opened to check if the deleted kext was still in there, but it wasn't, which is weird because I am certain I did not empty the trash. Any idea how to figure out what the kext was I deleted?

Thanks for your help :)
 
Hi, thanks for your help.

This is my first time really using the terminal with all its command so please bear with me here.

I did what you said and also what was said in the other post. I navigated the terminal in single user mode (is that the UEFI shell?) to my library. I deleted the Caches folder there, then shutdown. I booted and the progress bar got to 100%, stayed there for a while, then the screen turned off while the machine remained on (which it didn't do before, it just stayed at the loading bar forever)

While I was navigating the directories and such, I found the .Trash folder which I opened to check if the deleted kext was still in there, but it wasn't, which is weird because I am certain I did not empty the trash. Any idea how to figure out what the kext was I deleted?

Thanks for your help :)

When I say Uefi Shell I specifically refer to the shell built into Clover boot menu as I thought you couldnt boot into your desktop anymore. Second you no longer should place 3rd party kexts in L/E or even S/L/E. Now its advised you keep them in your efi folder in Kexts/Other. At this point I would make sure your essential kexts are where theyre suppose to be and update 3rd party kexts in Kexts/Other such as fakesmc, lilo, weg to latest versions and try again.
 
When I say Uefi Shell I specifically refer to the shell built into Clover boot menu as I thought you couldnt boot into your desktop anymore. Second you no longer should place 3rd party kexts in L/E or even S/L/E. Now its advised you keep them in your efi folder in Kexts/Other. At this point I would make sure your essential kexts are where theyre suppose to be and update 3rd party kexts in Kexts/Other such as fakesmc, lilo, weg to latest versions and try again.


That is true, I cannot boot into desktop. I was using single user mode which let me type commands aswell because I don‘t see the built in Shell in my Clover, which might be because I was messing around with the entries clover scans for yesterday. I think I can access the UEFI Shell with my Rescue USB though.

I don‘t have any 3rd party kexts in my L/E S/L/E, which is also the reason that I have this problem, like I explained in my first post. All my kexts are in other, but I apparantly have deleted a non-apple non-3rd party kext somehow, which I didn‘t put into the Extensions folder and which is also not listed in the beginning of this thread.

Guess I have to keep digging around, still thank you.
 
Alright, for whatever reason I was just able to boot to desktop. The name of the kext I deleted which put itself into L/E was CmUSBMassStorage. Does anyone know what that does? Should I put it in my EFI/Clover/kexts/other? I'm not even sure that that was my problem...
This is so frustrating, I want to know what the issue was, how does it all of a sudden work, I don't get it.


Also, can someone tell me what the difference between S/L/E and L/E is? And why the guide only mentions deleting kexts out of L/E?
 
Alright, for whatever reason I was just able to boot to desktop. The name of the kext I deleted which put itself into L/E was CmUSBMassStorage. Does anyone know what that does? Should I put it in my EFI/Clover/kexts/other? I'm not even sure that that was my problem...
This is so frustrating, I want to know what the issue was, how does it all of a sudden work, I don't get it.


Also, can someone tell me what the difference between S/L/E and L/E is? And why the guide only mentions deleting kexts out of L/E?
/System/Library/Extensions is for Apple System kexts, do not touch, or move those

/Library/Extensions are for signed kexts from 3rd party Applications

if you have moved or deleted or messed up Apple kexts (some do live in /L/E) then re run your macOS installer to refresh your kexts
 
I followed the steps in #1, but the kexts are still listed when I run sudo kextcache -i / is that expected behaviour?

Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163f0d940 [0x7fff878718c0]> { URL = "file:///Library/Extensions/FakeSMC.kext/", ID = "org.netkas.driver.FakeSMC" }


Kext with invalid signature (-67050) allowed: <OSKext 0x7fa163da7390 [0x7fff878718c0]> { URL = "file:///Library/Extensions/USBInjectAll.kext/", ID = "com.rehabman.driver.USBInjectAll" }


Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163d22f80 [0x7fff878718c0]> { URL = "file:///Library/Extensions/WhateverGreen.kext/", ID = "as.vit9696.WhateverGreen" }


Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163d06b10 [0x7fff878718c0]> { URL = "file:///Library/Extensions/Lilu.kext/", ID = "as.vit9696.Lilu" }


Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163d72980 [0x7fff878718c0]> { URL = "file:///Library/Extensions/IntelMausiEthernet.kext/", ID = "com.insanelymac.IntelMausiEthernet" }


Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163d09a20 [0x7fff878718c0]> { URL = "file:///Library/Extensions/AppleALC.kext/", ID = "as.vit9696.AppleALC" }


Invalid signature -67050 for kext <OSKext 0x7fa163da7390 [0x7fff878718c0]> { URL = "file:///Library/Extensions/USBInjectAll.kext/", ID = "com.rehabman.driver.USBInjectAll" }

I have yet to reboot, I am keeping my backup copy close at hand
 
I followed the steps in #1, but the kexts are still listed when I run sudo kextcache -i / is that expected behaviour?

Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163f0d940 [0x7fff878718c0]> { URL = "file:///Library/Extensions/FakeSMC.kext/", ID = "org.netkas.driver.FakeSMC" }


Kext with invalid signature (-67050) allowed: <OSKext 0x7fa163da7390 [0x7fff878718c0]> { URL = "file:///Library/Extensions/USBInjectAll.kext/", ID = "com.rehabman.driver.USBInjectAll" }


Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163d22f80 [0x7fff878718c0]> { URL = "file:///Library/Extensions/WhateverGreen.kext/", ID = "as.vit9696.WhateverGreen" }


Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163d06b10 [0x7fff878718c0]> { URL = "file:///Library/Extensions/Lilu.kext/", ID = "as.vit9696.Lilu" }


Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163d72980 [0x7fff878718c0]> { URL = "file:///Library/Extensions/IntelMausiEthernet.kext/", ID = "com.insanelymac.IntelMausiEthernet" }


Kext with invalid signature (-67062) allowed: <OSKext 0x7fa163d09a20 [0x7fff878718c0]> { URL = "file:///Library/Extensions/AppleALC.kext/", ID = "as.vit9696.AppleALC" }


Invalid signature -67050 for kext <OSKext 0x7fa163da7390 [0x7fff878718c0]> { URL = "file:///Library/Extensions/USBInjectAll.kext/", ID = "com.rehabman.driver.USBInjectAll" }

I have yet to reboot, I am keeping my backup copy close at hand
navigate to /Library/Extensions and delete them
 
hm, now I'm getting a black screen after macOS finishes loading even though I have the same kexts in /Other as I did in /L/E before I deleted them.

Is there a way to re-add the kexts and rebuild caches from a different machine/boot drive?
 
Last edited:
To fix the black screen when your GPU's framebuffer is loaded, make sure you have agdpmod=pikera in your boot arguments and most importantly the latest Lilu & WhateverGreen kexts in /Other

If that's the case, you must boot in single user mode, run the command below and rebuild your kext cache and type reboot to restart.

Code:
mount -uw /
 
Back
Top