SSD TRIM is a command that tells a solid-state drive which data blocks are no longer in use and can be wiped internally. It keeps your drive fast and extends its lifespan. This article explains what TRIM does, why you might want to turn it off, and gives step-by-step instructions for disabling it on Windows, macOS, and Linux.
What Is SSD TRIM?
TRIM is an Advanced Technology Attachment (ATA) command that enables an operating system to inform a solid-state drive which blocks of data are no longer in use and can be erased. When you delete a file on a traditional hard disk, the OS simply marks that space as available; the actual data remains until overwritten. On an SSD, however, writing to a block that already contains data requires the drive to first erase the entire block, which slows down write operations. TRIM solves this by letting the drive know which blocks are free, so it can erase them in the background during idle time. This keeps write speeds high and reduces write amplification, which extends the drive’s life.
How TRIM Works
When you delete a file, the file system sends a TRIM command to the SSD for each affected block. The SSD then marks those blocks as invalid and schedules them for garbage collection. Garbage collection is a background process that consolidates valid data into fewer blocks and erases the invalid ones. Without TRIM, the SSD would have to move data around before writing, causing slower performance and more wear. TRIM is supported by most modern SSDs and operating systems, including Windows 7 and later, macOS 10.10.4 and later, and Linux kernels 2.6.33 and later.
Why Would You Want to Disable TRIM?
Although TRIM is generally beneficial, there are a few scenarios where you might want to turn it off:
- Data recovery: TRIM permanently erases deleted data, making it impossible to recover with standard tools. If you need to recover files, disable TRIM before deleting them.
- RAID arrays: Some RAID controllers do not support TRIM, and passing TRIM commands through can cause issues. In such cases, disabling TRIM may improve stability.
- Compatibility: Older SSDs or certain drivers may have bugs with TRIM, leading to system crashes or data corruption.
- Benchmarking: Some users disable TRIM to get consistent write performance numbers in benchmarks.
How to Check If TRIM Is Enabled
Before disabling TRIM, you may want to verify its current status. Here’s how to check on different operating systems:
- Windows: Open Command Prompt as administrator and run
fsutil behavior query DisableDeleteNotify. If it returnsDisableDeleteNotify = 0, TRIM is enabled; if1, it’s disabled. - macOS: Run
system_profiler SPSerialATADataType | grep TRIMin Terminal. If it saysTRIM Support: Yes, TRIM is enabled. - Linux: Run
lsblk -Dto see the discard support column. If it shows0, TRIM is enabled.
How to Disable TRIM on Windows
Disabling TRIM on Windows is done via the command line. Follow these steps:
- Open Command Prompt as administrator (right-click Start, then select “Command Prompt (Admin)” or “Windows PowerShell (Admin)”).
- Type the following command and press Enter:
fsutil behavior set DisableDeleteNotify 1 - To re-enable TRIM later, use
fsutil behavior set DisableDeleteNotify 0.
Note: This command affects all SSDs on the system. There is no built-in way to disable TRIM for a single drive in Windows.
How to Disable TRIM on macOS
On macOS, TRIM is enabled by default for Apple SSDs, but for third-party SSDs, it may need to be enabled via a command. To disable TRIM:
- Open Terminal (found in /Applications/Utilities/).
- Type
sudo trimforce disableand press Enter. - You will be prompted for your password, then asked to confirm. Type
yand press Enter. - Restart your Mac when prompted.
This command works on macOS 10.10.4 and later. If you have an Apple SSD, disabling TRIM may negatively affect performance.
How to Disable TRIM on Linux
On Linux, TRIM can be disabled by changing the mount options for the filesystem. The method depends on whether you use the discard mount option or a periodic fstrim service.
- If you mount with the
discardoption: Edit/etc/fstaband removediscardfrom the options for the SSD’s partition. Then remount the filesystem. - If you use fstrim (e.g., via systemd timer): Disable the timer with
sudo systemctl disable fstrim.timer.
To check if the discard option is in use, run mount | grep discard. To see if fstrim is scheduled, run systemctl list-timers | grep fstrim.
Frequently Asked Questions
Does disabling TRIM damage my SSD?
No, disabling TRIM won’t immediately damage your SSD, but it will cause write performance to degrade over time as the drive fills up. The drive will have to do more work during garbage collection, which can increase wear and shorten the drive’s lifespan. It’s generally recommended to keep TRIM enabled unless you have a specific reason to turn it off.
Can I re-enable TRIM after disabling it?
Yes, you can re-enable TRIM at any time by reversing the steps. On Windows, set DisableDeleteNotify back to 0. On macOS, run sudo trimforce enable. On Linux, add the discard mount option back or re-enable the fstrim timer.
Does TRIM work on all SSDs?
Most modern SSDs support TRIM, but some older models may not. Additionally, some external SSDs connected via USB may not support TRIM. Check your drive’s specifications or use a tool like CrystalDiskInfo on Windows to verify support.
Is TRIM the same as garbage collection?
No, TRIM and garbage collection are related but different. Garbage collection is a process performed by the SSD itself to free up blocks. TRIM is a command from the OS that tells the SSD which blocks are no longer in use, making garbage collection more efficient. Without TRIM, the SSD still does garbage collection, but it must guess which blocks are free, which is less efficient.
Will disabling TRIM help with data recovery?
Yes, if you disable TRIM before deleting files, the data may remain on the SSD and be recoverable with specialized software. However, if TRIM has already been enabled and you’ve deleted files, the data may already be erased. For critical data recovery, it’s best to consult a professional service.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Access Your Computer From Anywhere: Step-by-Step
- How to Get More Disk Space on Mac: 12 Fixes
- Wii Browser Games With a USB or Bluetooth Controller
- Delete Focus on iPhone: Quick Steps
- Open System Configuration in Windows 10: 7 Ways
- How to Connect VPN: Step-by-Step Setup Guide