Enable TRIM for non-Apple SSD on macOS

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
1,128
Reaction score
57
Points
48
You can activate TRIM with trimforce.

This command activates TRIM for every single SSD on your Mac. It disables the check that only allows TRIM to work with Apple-provided OEM solid-state drives.

After you run it, TRIM will be enabled for all your solid-state drives. There is no way to enable TRIM for one SSD and leave it disabled for another.

To run trim force, open a Terminal window (press Command + Space, then type: Terminal, and press Enter to launch a terminal via Spotlight).

Type the following command into the terminal window and press Enter:
Bash:
sudo trimforce enable
Code:
macmini:~ andy$ sudo trimforce enable
Password:
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)? y
Your system will immediately reboot when this is complete.
Is this OK (y/N)? y
Enabling TRIM...
.
.
Operation succeeded. Your system will reboot momentarily, please wait...

Your Mac will immediately reboot after you agree to the second question with a y. After it reboots, TRIM will be enabled for all SSDs connected to your Mac.

Here's my System Information window showing that TRIM Support is now Yes (enabled) :

macos-trimsupport.png


If you ever want to disable trim force and only use TRIM for Apple's OEM solid-state drives, open a Terminal window again and run the following command:
Bash:
sudo trimforce disable

Realistically, this should work properly with most SSDs on a Mac, just as enabling TRIM works properly for most SSDs on Linux. But there are a few outliners, and Apple doesn't want to be responsible if your SSD's hardware doesn't implement TRIM properly and you run into problems.

Let me know what do you think about this by commenting down below.

Cheers
 
 Short URL:
Back
Top