How to Enable TRIM on Third Party SSDs in Mac OS X with trimforce

For Mac users who utilize third party SSD volumes, the new trimforce command allows OS X to forcibly enable the TRIM function on those drives. trimforce is built directly into newer releases of OS X and is really quite easy to enable (or disable), requiring a quick visit to the command line and a reboot of the Mac to complete.

To be able to enable TRIM on non-Apple SSD volumes with the trimforce command, the Mac will need a third party SSD, and to be running either OS X El Capitan 10.11.x or OS X Yosemite 10.10.4 or later versions, the command does not exist in prior releases of OS X (though earlier versions of OS X can use the third party TRIM Enabler utility).

Be sure to back up before using the TRIM command, whether with Time Machine or your complete backup method of choice, and continue to back up your data on a regular basis, as using trimforce could potentially cause data loss or an issue. Apple specifically states in the command that the tool is not warrantied, and therefore it’s up to the user to risk using the feature or not.

It may go without saying, but do note that TRIM is enabled automatically by default for all Apple SSDs, meaning if your Mac shipped with an SSD drive installed from Apple, this is not a necessary utility. trimforce is aimed specifically at users who are using third party SSD drives with their Macs. Likewise, TRIM does not work on standard spinning hard drives, and thus is not necessary in those situations either. Finally, some SSD products come with their own built-in garbage collection functions, negating the need for TRIM.

How to Enable TRIM on Third Party Drives in OS X with trimforce

Did you complete a backup yet? Don’t attempt to enable TRIM without doing so. When you’ve done that, launch Terminal from /Applications/Utilities/ and enter the following command string:

sudo trimforce enable

Hit return and enter the administrator password, you’ll be presented with the following message reminding you the utility has no warranty and that you should backup your data. Don’t ignore this advice.

“IMPORTANT NOTICE: This tool force-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an “as is” basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU.
Are you sure you wish to proceed (y/N)?”

Assuming you’re OK with the risk, hit Y to proceed and follow the instructions, hitting Y again to enable TRIM. Enabling TRIM by using the trimforce command requires the Mac to reboot, which will happen automatically once the feature is enabled or disabled. When you see the “Operation succeeded” message, the Mac will soon reboot with TRIM enabled.

Disabling TRIM in Mac OS X with trimforce

If you want to turn off the TRIM feature within OS X on this party volumes, you simply need to change the trimforce command to disable instead:

sudo trimforce disable

Again, the Mac will need to reboot to complete the process of disabling TRIM.

If you want to learn more about TRIM and how it helps SSDs function, you can read a bit more technical details on the Wikipedia page for the TRIM feature.

TRIM basically lets OS X know what blocks of data are no longer in use so they can be deleted. This means OS X can write to an empty block for storing new data rather than overwriting existing data (albeit deleted data, mind you) which is more taxing on resources. It’s a maintenance thing, pretty technical. The idea is that it should extend the lifespan of an SSD.

If you have installed, or will install an SSD from OWC (Other World Computing), be aware that their own garbage collection firmware is more efficient than enabling TRIM support (by whatever means) on your Mac. There are plenty of articles on their web site, explaining this.

Be VERY CAREFUL with this advice, author. Not all drives are meant to have TRIM enabled. In fact, Samsung specifically warns not to enable trim on their SSDs. There is simply no need, and in fact can result in a loss of useable space and lowered performance. For the best information on SSDs, head to anandtech.com. They do exhaustive tests and reports.

I received the EXACT opposite recommendation direct from Samsung support. I installed a new Samsung 850 pro series SSD, and within 2 weeks it basically ate itself alive, enough my machine would not boot. Samsung support blamed me because I did NOT enable TRIM, and to run their drives on my MAC it has to be enabled. This is not listed anyplace in their documentation with he drive.

I promptly returned it and replaced with a generic brand device. Running now for 4 months without issue.

I have installed SSD’s in many of my macs and never enabled TRIM and never had an issue. (until the Samsung)

The recommendation I received NOT to use TRIM came directly from Samsung. Having read about it on Anandtech, I spoke to the most senior SSD tech I could reach at Samsung. Note: this was several years ago, and was specifically in regards to a Samsung 830 installed in a Mid-2009 Macbook Pro. I can assure all who responded that such was the recommendation from Samsung several years ago. If it has changed or is no longer relevant, I’m satisfied. In any case, I generally find it dicey to offer blanket advice on changing under-the-hood settings.

By the way, I have a Samsung 830 236 gig, an 840 500 gig and two OWCs (500 and 1tb). None have TRIM enabled, each gets flogged all the time, and I have never had any sort of problem.

I agree, I have not heard anything official. But when I called support their 2nd level support engineer said the drive cratering was my fault for not enabling TRIM and said he would need to get an exception fro me to RMA it. I did get the RMA, but returned it to NewEgg as defective.

At that point I decided against ever getting another Samsung SSD product.

You can disable it too, and check through About this Mac / More info if trim is enabled or not.

Also note that on Snow Leopard, AppleJack (here: http://applejack.sourceforge.net/) will trim your SSD every time you run the utility (in Single User mode) if you have enabled it with the ad-hoc Terminal command.

I’m not sure it works with Lion and above, as many maintenance routines have been modified with the advent of OS X 10.7.

In effect, trim is a good thing for SSD’s that were engineered to make good use of the functionality, in the sense that it makes unused blocks available to replace those that have been read from and/or written to too many times to still be usable.

No, it actually does indicate if it is on or off. I used trimforce disable and when the computer restarted it indicated “trim support: no”, and when I used trimforce enable, after restarting it indicated “trim support: yes”

I’ve an iMac Retina 5K 27″ Late 2014.
It has a Fusion Drive.
I want to use a SSD as external (Thunderbolt or USB3).
Does enabling TRIM via the method in this article interfere with Apple’s TRIM on the Fusion Drive?
And, also is it effective with an external SSD?

First question: doesn’t matter if you enable TRIM on third-party drives or not; TRIM is always used for the Apple SSD in your (and my) iMac Retina 5K 2014. Verify it using System Information.

Second question: yes, external drives will also be trimmed, if they are using AHCI, i.e. they are connected to a SATA controller inside a Thunderbolt enclosure. This works, though be aware that many such drives perform poorly with TRIM. Test it out before depending on it.

“””Scott says:
October 30, 2015 at 10:51 am
This is not if it is on or not, but if the drive supports TRIM.”””
No : if it says “yes” it means that the Trim command in OSX is enabled. It has nothing to do with Trim supported on the SSD or not: OSX can not see that at all. When there is no trim support, it just does not do anything (like on a HDD), if it is supported the SSD controller will use it.
Do not use trim. And certainly not on the blacklisted SSDs, see my post above.

I have been using Trim Enabler, and now Disk Sensei, on my 2013 MacBook Pro with a Samsung 830 SSD for almost two years now. Periodically, I will run Blackmagic Disk Speed and I can assure you that enabling Trim Support on a Samsung SSD makes all the difference in the world. Early on, I turned Trim Support off for several months and my machine slowed in performance in a huge way. I have had no issues at all with this setup.

Take care of keeping your working version of the tool Trim Enabler if you have one, and do not update it since now it is no longer free but must be paid if updated to the current version.
You only learn of the new payment need once you made the mistake of following the suggestion of updating it…

This website and third-party tools use cookies for functional, analytical, and advertising purposes. By continuing to browse the site, closing this banner, scrolling this webpage, or clicking a link, you agree to these cookies. You can review our privacy policy for additional information.I AcceptPrivacy Policy