Enable TRIM for Any SSD in OS X (Yosemite 10.10.4 or Later)

Keep the SSDs you add to your Mac in top shape

Generic SSD illustration

Wladimir Bulgar / Science Photo Library / Getty Images

Ever since Apple first offered Macs with SSDs, they've included support for TRIM, a method for the OS to assist an SSD in freeing up space.

TRIM Command

The TRIM command is issued by the operating system to assist an SSD in cleaning up data in storage blocks that are no longer needed. This helps the write performance of an SSD by keeping more blocks of data free to be written to. It also keeps the SSD from being aggressive in cleaning up after itself and causing wear on the memory chips, leading to early failure.

TRIM is supported in OS X Lion (10.7) and later, but Apple only enables the TRIM command for use with Apple-supplied SSDs. It’s not clear why Apple limited TRIM support this way, but the conventional wisdom is that TRIM implementation is up to the SSD manufacturer, and each SSD manufacturer uses a different TRIM methodology. As such, Apple only wanted to use TRIM on SSDs that it has certified.

That left those of us who like to upgrade our Macs out in the cold, at least when it came to running performance-enhancing SSDs. Without support for TRIM, there was a possibility that over time, our expensive SSDs would slow down, and we would see a real performance drop-in writing to the SSD.

Thankfully, there are a few third-party utilities that can enable TRIM for non-Apple-supplied SSDs, including TRIM Enabler. These utilities make use of Apple’s built-in TRIM support; they just removed the ability for the OS to check if the SSD is on Apple’s list of approved manufacturers.

Apple Makes TRIM Available to All SSDs

Starting with OS X Yosemite 10.10.4 and later, Apple made TRIM available to any SSD, including those installed by DIYers, like many of us here at About: Macs, and many of you. But although Apple now supports third-party SSDs, it turned TRIM off for non-Apple-supplied SSDs and left it up to the user to manually turn TRIM support on, if so desired.

Should You Use TRIM?

Some early-generation SSDs had unusual implementations of the TRIM function that could lead to data corruption. For the most part, these early SSD models were difficult to come across, unless you picked one up from a source that specialized in used products, such as flea markets, swap meets, or eBay.

One thing you should do is check with the SSD manufacturer to see if there are any firmware updates for the SSD model you have.

It’s not just older SSDs that can have problems, though. Some popular SSD models, such as Samsung 840 EVO, 840 EVO Pro, 850 EVO, and 850 EVO Pro, have exhibited problems with TRIM that can lead to data corruption. Luckily for us Mac users, the Samsung TRIM issues seem to only become apparent when used with queued TRIM commands. OS X only makes use of sequential TRIM commands at this time, so enabling TRIM with the Samsung line of SSDs should be OK, as reported by MacNN.

The Importance of Backups

You can use the TRIM command with the third-party SSD on a Mac Pro without issues, but before enabling TRIM, make sure you have a backup system in place. Should an SSD exhibit a failure caused by TRIM, it's likely to involve large blocks of data being reset, causing non-recoverable file loss.

How to Enable TRIM in OS X

Before you proceed, remember the TRIM function is automatically enabled for Apple-supplied SSDs; you only need to execute the following steps for third-party SSDs you installed as upgrades.

A Few Additional Notes About TRIM

TRIM isn't supported in external enclosures that use USB or FireWire as the method of connection to your Mac. Thunderbolt enclosures with SSDs do support the use of TRIM.

Turning TRIM off for Third-Party SSDs

Should you decide you don’t wish to have TRIM turned on for third-party SSDs, you can use the TRIMforce command to disable TRIM by following the instructions above and replacing the Terminal command with:

sudo TRIMforce disable

Just as when you turned TRIM on, you'll need to reboot your Mac to complete the process of turning TRIM off.