In solid-state drives (SSDs), TRIM is a command that helps, well, trim down the unnecessary writing to a solid-state drive (SSD) hence maximizing its life span.
Even an SSD of extreme endurance, like the Samsung 970 PRO, can quickly become unreliable with TRIM disabled.
This post will walk you through the process of checking the TRIM status and enabling it on a Windows or a Mac computer.
Dong’s note: I first posted this piece on May 23, 2018, and updated it on March 30, 2021, with additional relevant information.
Table of Contents
SSD TRIM command: What is it?
TRIM is literally a command, it’s not an acronym.
This command is complementary to an SSD’s garbage collection where the drive organizes its cells in preparing for writing. It preemptively notifies the SSD which data pages in a particular block can be erased.
Consequently, TRIM helps the drive’s controller to work more efficiently and reduces the amount of unnecessary writing, called write amplification, on the drive, hence, prolonging the drive’s longevity.
How to work on the SSD TRIM command on a Windows computer
These steps apply to Windows 7, 8, 10, and 11. Older Windows versions — if you still use them for some reason — don’t support TRIM. As a result, yous shouldn’t use SSDs with them.
How to check the SSD TRIM on a Windows machine
- Use the Windows key + X keyboard shortcut (press and hold the Windows key, then press on X). Alternatively, you can right-click on the Start button to bring up the Power User menu. Now select Windows Powershell (Admin). (On earlier versions of Windows, you can use the Command Prompt (Admin).
- Type in the following command into the Powershell window, then press Enter. (You can also copy and paste it.)
fsutil behavior query DisableDeleteNotify
If the command returns 0 (zero), you’re all good. Despite the fact you see the word “(Disabled),” TRIM is enabled on the computer, and there’s nothing else you have to do.
If not, you need to enable it.
How to enable/disable TRIM on a Windows computer
- Use the Windows key + X keyboard shortcut to bring up the Power User menu, and select Windows Powershell (Admin).
- To enable TRIM, enter the following command in the Powershell window, then press Enter:
fsutil behavior set DisableDeleteNotify 0
To disable TRIM (if somehow you want to do that), use the same command but substitute 0 with 1
fsutil behavior set DisableDeleteNotify 1
And that’s it. You can rest assured you’ve taken the necessary steps to ensure your SSD will work well and last on your Windows computer.
How to work with the SSD TRIM command on a Mac
Things are a little different on a Mac — it’s slightly more complicated or simple, depending on how you look at it.
All new MACs come with an SSD internal drive with TRIM already turned on by default. You can’t even change or upgrade the internal storage for most of them.
That said, checking the SSD TRIM command is only necessary with models that allow you to change the internal drive. In that case, these steps apply to most versions of macOS.
Checking SSD TRIM on a Mac
- Click on the Apple icon (top-right corner), then choose About This Mac.
- Click on System Report.
- On the left pane of the System Information window, under Hardware, navigate to SATA/SATA Express (if you use a standard SATA SSD) or NVMExpress (if you use an NVMe SSD). It doesn’t hurt to check both sections.
- On the right pane, scroll down until you find TRIM Support. If the value is Yes, then TRIM is running — you’re all good! Otherwise, go to the next step.
How to enable SSD TRIM on a Mac
Again, it’s important to note that the SSD TRIM on a Mac can be complicated and might not work the same for all SSDs. If your machine comes with an SSD, TRIM is automatically enabled (or disabled for a particular reason).
You should check with your vendor to make sure an SSD supports your Mac before installing it on the machine, and then tread lightly with the next steps.
- Run Terminal (you can search for it using Spotlight at the top right corner)
- Type in the following command and press enter:
sudo trimforce enable
You’ll need to enter the password (of your Mac account) and confirm that you want to enable TRIM. Answer those prompts affirmatively (again, make sure your SSD supports the Mac). The machine will restart with TRIM enabled.
Extra: TRIM and (USB) portable SSDs
It’s worth noting that generally, the USB connection doesn’t support TRIM. Consequently, when you use a portable drive via USB, there’s no way to enable TRIM on it.
However, most of these drive comes with firmware that supports wear-leveling, and since USB can be relatively slow, the lack of TRIM support doesn’t affect the drive’s positivity.
It’s worth noting that Thunderbolt supports TRIM, and starting with USB4 and Thunderbolt 3, these two peripheral connection types have slowly merged.
The most important thing about SSD TRIM is that it’s enabled. I’ve seen good SSDs deplete their writes in months or even days, in normal use, with TRIM turned off.
If you install a new (or even used) SSD on a computer, checking to make sure TRIM works properly is the first and most important step. Also, don’t use SSDs with an operating system that doesn’t support TRIM.