Thursday, October 3, 2024 โ€ข Welcome to the ๐Ÿ’ฏ Nonsense-Free Zone!
๐Ÿ›๏ธ Todayโ€™s ๐Ÿ”ฅ Deals on An image of Amazon logo๐Ÿ›’

SSD TRIM Command: How to Make Sure It’s Enabled on Your Computer

Share what you're reading!

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.

Here's the Micron Crucial P5 Plus PCIe Gen 4.0 NVMe SSD in action.
SSD TRIM command: It needs to be enabled for the solid-state drive, including the latest one like this Crucial P5 Plus, to work efficiently and last a long time.

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

All is good! TRIM is enabled.
SSD TRIM command: All is good! It's now enabled.
  1. 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).
  2. 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

The command to disable and enable TRIM on a Windows computer.
SSD TRIM command: The command to disable and enable it on a Windows computer.
  1. Use the Windows key + X keyboard shortcut to bring up the Power User menu, and select Windows Powershell (Admin).
  2. 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

If your Mac comes with an SSD, chances are TRIM is already enabled.
SSD TRIM command: If your Mac comes with an SSD, TRIM is already enabled.
  1. Click on the Apple icon (top-right corner), then choose About This Mac.
  2. Click on System Report.
  3. 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.
  4. On the right pane, scroll down until you find TRIM SupportIf 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.

The command to enable TRIM on a Mac.
The command to enable TRIM on a Mac.
  1. Run Terminal (you can search for it using Spotlight at the top right corner)
  2. 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 takeaway

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.

Share what you just read!

Comments are subject to approval, redaction, or removal. You're in the no-nonsense zone and that applies BOTH ways.

It's generally faster to get answers via site/page search. Your question/comment is one of many Dong Knows Tech receives daily. ย 

  1. Strictly no bigotry, falsehood, profanity, trolling, violence, or spamming, including unsolicited bashing/praising/plugging a product, a brand, a piece of content, a webpage, or a person (โ€ข).
  2. You're presumed and expected to have read this page in its entirety, including related posts and links in previous comments - questions already addressed will likely be ignored.
  3. Be reasonable, attentive, and respectful! (No typo-laden, broken-thought, or cryptic comments, please!)

Thank you!

(โ€ข) If you have subscription-related issues or represent a company/product mentioned here, please use the contact page or a PR channel.

14 thoughts on “SSD TRIM Command: How to Make Sure It’s Enabled on Your Computer”

  1. If Trim is enabled in Windows 10, does that take care of external SSDs as well?
    I actually received two returns to the command, one for “NTFS” and one “ReFS”, both disabled.

    Reply
    • When enabled in Windows, TRIM is supported whenever applicable, Deb. If you use a USB drive, though, TRIM is *likely* not applicable since USB doesn’t support it. But generally, USB is relatively slow so it won’t matter much. Thunderbolt supports TRIM.

      USB4 and Thunderbolt 3 are the same things so if you use a USB4 drive, it’ll support TRIM. More about USB vs TB in this post.

      Reply
  2. Hi!

    Just a question.

    Is it possible to recover deleted files after emptying trash on mac with trim ssd enabled/support?

    Regards

    Reply
    • Generally no. It can be tough to recover deleted data on an SSD due to how information is written. More here. This, of course, depends on how long the information has been removed, etc. Many SSDs tend to optimize on their own, including removing data from cells marked as “free”.

      Reply
      • Thanks for the response! Looks like i have no luck retrieving my deleted files ๐Ÿ™ no point in sending my mac for recovery service.

        Curious. Any idea how often an Apple SSD ‘trims’ itself? is it periodically or instantly when a data is deleted

        Reply
        • That depends on a particular SSD’s controller. But you need backups, you can NEVER count on data recovery. If you delete something, it’s supposed to be GONE.

          Reply
  3. I upgraded from the original SATA HD in my macbook pro to a 1 TB Samsung SSD in 2016 and did have to activate TRIM then. I am now going to install a 2 TB Samsung 870 EVO (thanks for your review btw). Does this process need to be done again or will it remain activated?

    Reply
  4. Windows? Mac? Yup. Run them both. But my Samsung 960 is in my Linux desktop PC. 7 of the home machines run Windows of all flavors, 2 run MacOS, & 12 run Linux (or BSD). It doesn’t have to be Windows OR Linux, I’m sure there’s many users like myself that run varying OS depending upon need. We’re out here. Linux may dominate the Web-server world, but there’s plenty of desktops out there running Linux, & for good reason. Each platform has it’s pluses & minuses, thinks it does better than the others, but for day to day stuff: Linux.

    Reply

Leave a Comment

๐Ÿ“Œ
Our Top 5 Best Collection