Enabling and Disabling Trim for 3rd Party SSDs in OSX

A few years ago I purchased a 2012 Mac mini that came with the super slow 5400 RPM 1TB disk. The cost of purchasing the system with an SSD was what I considered to be outrageous so I opted to install a 3rd party SSD (Samsung EVO drive) with great success using Carbon Copy Cloner. What I soon realizes is that OSX does not support trim for 3rd party SSDs by default.

What is Trim? Trim is the process by which the OS performs garbage collection of space that is no longer in use on the SSD to keep space available and the drive performant. There is a way within OSX to enable trim for 3rd party SSDs, however before enabling it be advised that it will enable it for all drives attached and taking a backup or using time machine would be a reasonable step just in case something goes sideways. Also worth noting is that enabling or disabling trim will require a reboot.

To enable trim on 3rd party SSDs in 10.11 and newer run the following command in terminal:

sudo trimforce enable

If you no longer want to have trim enabled you can simply run this command to disable it:

sudo trimforce disable

One thought on “Enabling and Disabling Trim for 3rd Party SSDs in OSX”

Leave a Reply

Your email address will not be published.

seventeen − 3 =