How to Enable TRIM For All SSDs in OS X Mavericks

Posted in How To, Mac, OS X on 06/11/2013 by J. Glenn Künzler

15s

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.

SSD TRIM

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

Screen_Shot_2013-11-06_at_11.46.13_AM-2

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!


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

    • Guest

      Apple SSD’s are automatically enabled.

  • Craig

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

    • readmore

      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 😉

  • Jia Yanwei

    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.
    jovi.jia@gmail.com

    • Bart

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

      • Someone trying to help

        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

        • Zoomie

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

          • Pelayo

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

  • Bart

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

  • BRossow

    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.

  • Kevin

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

  • owen

    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.

  • evilplatypus

    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.

    • backlyt

      Same

Author

J. Glenn Künzler

Glenn is Managing Editor at MacTrast, and has been using a Mac since he bought his first MacBook Pro in 2006. Now he's up to his neck in Apple, and owns an old iBook, a 2012 iMac with an extra Thunderbolt display for good measure, a 4th-generation iPad, an iPad mini, 2 iPhones, and a Mac Mini that lives at the neighbor's house. He lives in a small town in Utah, enjoys bacon more than you can possibly imagine, and is severely addicted to pie.