How To Enable TRIM On SSD: Windows Mac And Linux
You spent good money on an SSD to speed up your computer. But over time, you’ve noticed things slowing down. Writes take longer, and your once-snappy system feels sluggish. The culprit might not be a failing drive. It might be that TRIM isn’t enabled.
TRIM is one of those behind-the-scenes features that most people never think about, yet it has a direct impact on how well your SSD performs over months and years of use. Without it, your SSD gradually loses speed and could even wear out faster than necessary. The good part is that enabling TRIM is quick and easy on every major operating system.
This guide walks you through exactly what TRIM does, why it matters, and how to enable and verify it on Windows, macOS, and Linux. You’ll also find troubleshooting steps for when things don’t work as expected.
What Is TRIM and Why Does It Matter?
To understand TRIM, you need to know a little about how SSDs work differently from traditional hard drives. On a regular HDD, when you delete a file, the operating system simply marks that space as available. When new data needs to be written, it overwrites those old blocks directly. Simple.
SSDs can’t do that. Flash memory cells must be erased before they can be written to again. This erase operation happens at the block level, which is much larger than the page level where writes occur. When your SSD needs to write new data to a block that contains stale (deleted) data, it has to read the entire block, erase it, and then write both the new data and any still-valid data back. This process is called write amplification, and it’s slow.
TRIM solves this problem by telling the SSD which blocks of data are no longer needed. When you delete a file, the operating system sends a TRIM command to the drive, letting it know those cells can be erased during idle time. That way, when new writes come in, the SSD has pre-cleaned blocks ready to go.
The Performance and Longevity Benefits
With TRIM enabled, your SSD maintains consistent write speeds over time instead of gradually degrading. Tests have shown that SSDs without TRIM can lose up to 50% of their write performance after sustained use. Samsung, Crucial, and other manufacturers all recommend having TRIM active.
Beyond speed, TRIM also reduces unnecessary write cycles. Since the SSD doesn’t have to perform as many read-modify-write operations, the flash cells endure less wear. This translates to a longer lifespan for your drive. On a drive like the Samsung 870 EVO or Crucial MX500, which already have excellent endurance ratings, TRIM helps you get the most out of every terabyte written (TBW) in the spec sheet.
How to Enable and Verify TRIM on Windows
Windows 10 and Windows 11 both enable TRIM by default for recognized SSDs. But it’s still worth verifying, especially if you’ve cloned a drive, performed a clean install, or are using a less common SSD brand.
Step 1: Open Command Prompt as Administrator
Press the Windows key, type cmd, and then right-click on Command Prompt. Select Run as administrator. You’ll need elevated privileges for this.
Step 2: Check TRIM Status
Type the following command and hit Enter:
fsutil behavior query DisableDeleteNotify
You’ll see a result like DisableDeleteNotify = 0 or DisableDeleteNotify = 1. This naming is a little counterintuitive. A value of 0 means TRIM is enabled. A value of 1 means TRIM is disabled.
Step 3: Enable TRIM (If Disabled)
If the value came back as 1, enable TRIM with this command:
fsutil behavior set DisableDeleteNotify 0
Press Enter, and you’re done. No restart is required. TRIM commands will begin being sent to your SSD immediately when files are deleted.
Windows: Additional Notes
Windows also runs an automatic optimization schedule for SSDs. Open the Defragment and Optimize Drives tool (search for “Optimize Drives” in the Start menu) and confirm your SSD is listed and scheduled for optimization. Windows calls it “optimization” rather than “defragmentation” for SSDs, and what it actually does is send a full-volume TRIM pass. Make sure this is set to run weekly.
If your SSD shows up as a hard drive in this tool, your drive might not be properly recognized. Updating your SSD’s firmware or installing the manufacturer’s management software (like Samsung Magician or Crucial Storage Executive) can sometimes fix this.
How to Enable and Verify TRIM on macOS
Apple enables TRIM automatically on all Apple-branded SSDs, including those built into MacBook Air, MacBook Pro, iMac, and Mac Mini models. Third-party SSDs, however, have a slightly different story.
Checking TRIM Status
Click the Apple menu in the top-left corner and select About This Mac. Click System Report, then navigate to Hardware > SATA/SATA Express (or NVMExpress for NVMe drives). Look for the TRIM Support field. It will say either Yes or No.
Enabling TRIM for Third-Party SSDs
Starting with OS X Yosemite (10.10.4), Apple included a built-in command to enable TRIM on third-party SATA SSDs. Open Terminal (found in Applications > Utilities) and type:
sudo trimforce enable
You’ll be prompted to enter your administrator password. The system will display a warning that enabling TRIM on third-party drives could potentially lead to data loss. Apple includes this disclaimer because they can’t test every SSD on the market. In practice, every modern SSD from reputable manufacturers (Samsung, Crucial, Western Digital, SK Hynix) handles TRIM commands properly. Type y and press Enter to confirm.
Your Mac will restart automatically. After rebooting, go back to System Report and verify that TRIM Support now shows Yes.
macOS: NVMe Drives
If you’ve installed a third-party NVMe drive in an older Mac Pro or via a PCIe adapter, TRIM should work automatically in macOS High Sierra and later. Verify through System Report under the NVMExpress section. If it’s not showing as enabled, the trimforce command works for NVMe drives as well.
How to Enable and Verify TRIM on Linux
Linux has supported TRIM for years, but the approach to implementing it has evolved. There are two main methods: continuous TRIM (via the discard mount option) and periodic TRIM (via a scheduled timer). Most Linux experts today recommend the periodic approach.
Method 1: Periodic TRIM with fstrim.timer (Recommended)
Modern Linux distributions like Ubuntu 20.04+, Fedora, and Arch Linux include a systemd timer called fstrim.timer that runs TRIM once a week. This is the preferred method because it batches all TRIM commands together, reducing overhead and avoiding potential performance hiccups during heavy I/O.
Check if the timer is active:
sudo systemctl status fstrim.timer
If it’s not active, enable and start it:
sudo systemctl enable fstrim.timer
sudo systemctl start fstrim.timer
You can also run TRIM manually at any time with:
sudo fstrim -av
The -a flag trims all mounted filesystems that support it, and -v gives you verbose output showing how much space was trimmed on each partition.
Method 2: Continuous TRIM with the discard Mount Option
This approach sends a TRIM command every time a file is deleted. To enable it, edit your /etc/fstab file and add the discard option to your SSD’s mount entry:
UUID=your-uuid-here / ext4 errors=remount-ro,discard 0 1
While this works, it can cause minor performance dips during write-heavy workloads because the system is constantly issuing TRIM commands. For desktop users, the impact is usually negligible. For servers or database workloads, stick with the periodic timer method.
Verifying Your SSD Supports TRIM on Linux
Before enabling either method, confirm your SSD actually reports TRIM support:
sudo hdparm -I /dev/sda | grep -i trim
Replace /dev/sda with your actual device. You should see a line mentioning Data Set Management TRIM supported. For NVMe drives, use:
sudo nvme id-ctrl /dev/nvme0 -H | grep -i deallocate
Troubleshooting: What to Do When TRIM Isn’t Working
Sometimes you’ll follow all the steps and TRIM still doesn’t seem to be active. Here are the most common culprits and how to fix them.
Your SSD Firmware Is Outdated
Early SSD firmware versions from some manufacturers had buggy TRIM implementations. If your drive is more than a few years old, check the manufacturer’s website for firmware updates. Samsung Magician, Crucial Storage Executive, and Western Digital Dashboard all make firmware updates painless on Windows. On Linux, you can use fwupd for supported drives.
RAID Configuration Is Blocking TRIM
TRIM passthrough in RAID configurations is tricky. Not all RAID controllers support it. On Windows, Intel RST (Rapid Storage Technology) supports TRIM in RAID 0, but many hardware RAID controllers still don’t pass TRIM commands through. If you’re running a software RAID on Linux (mdraid), TRIM passthrough works starting with kernel 3.7, but you may need to verify it’s enabled.
USB or External Enclosures
If your SSD is in an external USB enclosure, TRIM support depends entirely on the enclosure’s bridge chip. Many cheap enclosures don’t support UASP (USB Attached SCSI Protocol) or TRIM passthrough. Look for enclosures that specifically advertise TRIM support. The Sabrent EC-SNVE and UGREEN NVMe enclosures are known to support TRIM passthrough over USB 3.1 and higher.
Encrypted Drives
If you’re using full-disk encryption, TRIM behavior varies. On Windows with BitLocker, TRIM works normally. On Linux with LUKS, you need to explicitly allow TRIM passthrough by adding the discard option to your LUKS configuration in /etc/crypttab. Be aware that enabling TRIM on encrypted volumes can leak information about which blocks are in use, which may matter for your threat model. For most people, the performance benefits outweigh this minor concern.
File System Doesn’t Support TRIM
Not every file system supports TRIM. On Linux, ext4, XFS, Btrfs, and F2FS all support it. FAT32 and NTFS support it on Windows. If you’re using an unusual file system, check its documentation. HFS+ on macOS supports TRIM, and APFS (the default on modern Macs) supports it natively.
How Often Should TRIM Run?
For most users, once a week is plenty. This is the default schedule on both Windows and Linux (with fstrim.timer). macOS handles TRIM in real time for supported drives, so there’s nothing to schedule.
If you do heavy file operations daily, like video editing where you’re constantly creating and deleting large files, you might benefit from running TRIM more frequently. On Linux, you can adjust the fstrim.timer to run daily by overriding the systemd timer configuration. On Windows, you can change the optimization schedule to daily in the Optimize Drives tool.
Running TRIM too frequently won’t damage your drive, but it does create minor I/O overhead. Weekly is the sweet spot for the vast majority of use cases.
Frequently Asked Questions
Does TRIM erase data permanently?
Yes, to a large extent. Once a TRIM command is issued and the SSD processes it, the data in those blocks is effectively gone. This is actually a security benefit, as it makes file recovery from deleted files much harder on SSDs compared to traditional hard drives. However, you should not rely on TRIM alone as a secure deletion method. If you need guaranteed data destruction, use the SSD’s built-in Secure Erase command or use encryption from the start.
Can I enable TRIM on an older SSD?
Most SSDs manufactured after 2010 support TRIM. Even older models like the Intel X25-M (second generation) and early Crucial M4 drives support it. Check your SSD’s spec sheet or use the verification commands listed above to confirm. If your drive doesn’t support TRIM, the SSD’s built-in garbage collection will still manage erased blocks, just less efficiently than with operating system-level TRIM.
Will enabling TRIM on a third-party Mac SSD void my warranty?
Enabling TRIM using Apple’s trimforce command won’t void your Mac’s warranty, and it won’t void your SSD’s warranty either. Apple included the command specifically for this purpose. The warning message is a liability disclaimer, not a genuine indication of risk. Millions of Mac users run third-party SSDs with TRIM enabled without issues.
Is TRIM the same as garbage collection?
They’re related but different. Garbage collection is an internal SSD process that reorganizes data and frees up erased blocks. It happens regardless of whether TRIM is enabled. TRIM simply gives the SSD better information about which blocks are truly unused, making garbage collection far more efficient. Think of TRIM as a helpful tip-off to the drive’s internal cleanup crew. Without TRIM, the garbage collector has to figure out on its own what’s still needed and what isn’t, which is slower and less effective.
Final Thoughts
Enabling TRIM is one of the simplest things you can do to keep your SSD performing at its best. It takes less than a minute on any operating system, and the long-term benefits to both speed and drive longevity are significant. Whether you’re running a Samsung 990 Pro, a WD Blue SN580, or an older Crucial MX500, TRIM should always be active.
Take two minutes right now to verify your setup. Open a terminal or command prompt, run the appropriate check command for your OS, and confirm everything is working. Your SSD will thank you, quietly, by staying fast for years to come.
James Kennedy is a writer and product researcher at Drives Hero with a background in IT administration and consulting. He has hands-on experience with storage, networking, and system performance, and regularly improves and optimizes his home networking setup.




