How to Add and Remove Kexts from macOS

Kexts, or kernel extensions, expand the basic functionality of macOS’s Darwin kernel. They’re analogous to drivers under Windows, and they let the kernel communicate with your computer’s hardware. Most of the time these files require no maintenance. But if you’re having problems, or you’re putting together a Hackintosh, you might need to fiddle with a kext or two.

You can find kexts in two places on your Mac. Most live in the “System/Library/Extensions” directory which is the primary home for kexts. Some are also found in the “/Library/Extensions” folder as well, but that’s less common.

You can recognize the files by their .kext extension as well as their plugin-style icon.

add-remove-kexts-macos-kext-location

There are two ways to remove a kext. The first way is by using the Terminal command kextunload.

1. Determine which kext you need to remove. Be absolutely certain you’ve got the right one. Removing a system-critical kext can cause major problems, and kext names are often cryptic.

2. Open Terminal and enter the following command:

sudo kextunload /System/Library/Extensions/kext.kext

Make sure to change “kext.kext” to the name of your kext file. For example, if the kext you want to remove is named “AppleIntelE1000e.kext,” the command would be:

sudo kextunload /System/Library/Extensions/AppleIntelE1000e.kext

add-remove-kexts-macos-kexts-unload

3. Type your administrator password and press Enter.

add-remove-kexts-macos-admin-password

If that fails to work, you can also just force-delete the kext using rm.

1. Use the following Terminal command to remove the kext file:

sudo rm -rf /System/Library/Extensions/kext.kext

Make sure to change “kext.kext” to the name of your kext file. For example, if the kext you want to remove is named AppleIntelE1000e.kext, the command would be:

sudo rm -rf /System/Library/Extensions/AppleIntelE1000e.kext

add-remove-kexts-macos-rm-command

2. Enter your admin password and press Enter.

add-remove-kexts-macos-enter-admin-password-again

3. Restart your computer.

add-remove-kexts-macos-restart

Installing kexts is not as simple as removing them. It can be done manually, but using a kext installation utility like KextBeast is much easier. KextBeast was created for use on Hackintoshes, but it will work just as well on a vanilla Mac.

1. Download KextBeast. If you don’t have a free account with tonymacx86.com yet, you’ll need to create one to download the file.

2. Move the kext file you want to install to your Desktop. The program will automatically operate on any kext files in the ~/Desktop directory, so make sure you’ve got the right one.

add-remove-kexts-macos-move-kexts-file

3. Open KextBeast and click “Continue.”

kextbeast-installation

4. Click “Continue” again.

kextbeast-installation-continue

5. Choose your system’s boot drive as the installation destination and click “Continue.”

kextbeast-select-hd

6. Tick the box next to “/System/Library/Extensions” or “/Library/Extensions,” depending on where your kext needs to be installed. If you don’t know which ome to pick, choose “/System/Library/Extensions.”

kextbeast-select-installation-folder

8. Click “Continue.”

kextbeast-installation-more-continue

9. Enter your administrator password and click “Install Software.”

kextbeast-installation-admin-password

10. Wait for the installation to finish and click “Close.”

kextbeast-installation-successful

11. Restart your computer.

kextbeast-restart-computer

Kexts can also be installed manually. It’s a more cumbersome process, however, and your Mac really doesn’t like you installing kexts like this.

1. Drag and drop your kext file into “/System/Library/Extensions”.

kextbeast-drag-to-extensions-folder

2. Click “Authenticate.”

kextbeast-authenticate

3. Enter your admin password.

kextbeast-authenticate-with-admin-password

4. Open Terminal and use the command sudo kextload kext.kext to load your newly copied kext file. Make sure to replace “kext.kext” with the name of your kext file.

kextload command

5. Enter your administrator password.

kextload-admin-password

6. Restart your computer.

kexts-restart-computer

You shouldn’t need to mess with kexts too often. If you do need to remove a kext, you can use Terminal to delete it without much trouble. And if you need to install a kext, use KextBeast to simplify the process.

Leave a Reply

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.