How to Enable TRIM For All SSDs in OS X Mavericks

How to Enable TRIM For All SSDs in OS X Mavericks

Ever since the release of OS X 10.6.8, Apple has been selectively enabling the TRIM command for SSDs in OS X. This support continues on in OS X Mavericks, but as many have noted, it only seems to work for Apple SSDs by default. We’ll show you how you can enable TRIM across the board.


What is TRIM?

The TRIM command is an important disk command for SSDs that keeps your flash memory appropriately cycled so that you can achieve faster read and write speeds, as well as a longer lifespan for your SSD. As such, TRIM support is not the trivial matter that some make it out to be (although certain manufacturers, such as Other World Computing, include firmware that eliminates the need for OS-level TRIM support).

How to Enable TRIM Via the OS X Terminal (Recommended)

In you have an SSD that supports TRIM, follow the below instructions to enable it in OS X Mavericks. Note: This involves the use of terminal commands, so proceed at your own risk.

First, enter the command found in this document in the Terminal app on your Mac (found in Applications/Utilities).

After entering this command, you’ll need to enter a second command:

sudo touch /System/Library/Extensions/

The above-linked document also contains some troubleshooting instructions, as well as details on how to disable TRIM support if necessary.

Using a Third Party Tool

If you don’t find success using the Terminal command to enable TRIM for your SSD, there are two third-party apps that can help you enable TRIM support. I recommend trying Chameleon SSD Optimizer first. If that doesn’t do the trick, you can try TRIM Enabler 3.0 or later for Mac. I don’t like to recommend third-party tools, as they often make system-level changes above and beyond those performed by the terminal command – and that may not be in your best interest long-term.

Verifying TRIM Support

To ensure that the command was successful, and that TRIM really is enabled on your SSD, click the Finder menu in the Menu bar, then navigate to About This Mac > More Info > System Report. Then, scroll to the SATA/SATA Express section, and select your SSD. You should see a section called TRIM


Note: In some cases, a restart may be required before TRIM shows as Enabled in the System Profiler. With Mavericks, not all SSDs will report TRIM support, but doing a benchmark both before and after the change should confirm that TRIM is functional.

Added Bonus: Thunderbolt TRIM Support!

As an added bonus in OS X Mountain Lion or later, including OS X Mavericks (I have not tested this in previous versions of OS X), raid can now also be enabled for SSDs hooked to your Mac through a Thunderbolt PCIe controller, such as the excellent Magma ExpressBox 3T!  For more info on these devices, check out our complete review roundup of Thunderbolt PCIe controllers – perfect for Apple’s 2013 Mac Pro!

If you’re looking for an SSD to use in your Mac, I recommend checking out the OCZ Vector or the Sandisk Extreme. Also, make sure to check out the full range of affordable SSDs available on Amazon!

For more helpful tips, check out our full collection of tutorials by visiting our How-To category!

  1. Kia Kamgar says:

    TRIM support is enabled on the MBPr 2013, I have one.

    1. Guest says:

      Apple SSD’s are automatically enabled.

  2. Craig says:

    What’s the mysteriously missing added bonus? My interested peaked seeing which products provide said bonus.

    1. readmore says:

      Keep using your ssd with out trim and you’ll find out sooner than later.

      Waiting to see your uneducated rants about how crap ssd technology is after that 😉

  3. Jia Yanwei says:

    sudo perl -pi -e ‘s|(x52x6Fx74x61x74x69x6Fx6Ex61x6Cx00).{9}(x00x51)|$1x00x00x00x00x00x00x00x00x00$2|sg’ /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

    -bash: syntax error near unexpected token `.{9}’

    I found the error when excuted the command. any help or suggestion? thx.

    1. Bart says:

      I also get the same error message, has anyone found how to make it work?

      1. Someone trying to help says:

        after copy paste, sometimes the ” ‘ ” gets corrupted and ends up pasted as a accent sign, just manually delete it and write it again before executing

        1. Zoomie says:

          When the quotes are corrected, should Terminal require the admin password again as it did in step one?

          1. Pelayo says:

            Solved the issue for me, terminal does not ask for password.

  4. Bart says:

    I also get the same error message than Jia, has anyone found how to make it work?

  5. BRossow says:

    The Word doc attached to this post should be updated to remove the smart quotes in the perl command. (Thanks for trying to be helpful, Word!) In the meantime, if users replace the two curly quotes in the command with straight single quotes, it will work as expected.

  6. Kevin says:

    Didn’t work under OS X Yosemite…Same config: Samsung 840 Pro via Thunderbolt.

  7. owen says:

    The word document is no longer linked – could this be fixed please?

    I still have Mavericks and I’m in no hurry to update to 10.10 while TRIM on third party SSDs is not supported without kexts.

  8. evilplatypus says:

    I get the following error:

    [computername]$ sudo perl -pi -e ‘s|(x52x6Fx74x61x74x69x6Fx6Ex61x6Cx00).{9}(x00x51)|$1x00x00x00x00x00x00x00x00x00$2|sg’ /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

    Can’t remove /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage: Operation not permitted, skipping file.

    1. backlyt says:


Leave a Reply

Your email address will not be published. Required fields are marked *