Enable Trim in Windows 11 – Step‑by‑Step Guide
In this article
Yes, you can enable Trim in Windows 11 by adjusting the power and storage settings, or by running a simple command with administrative rights. Enabling Trim lets the operating system inform your SSD which blocks of data are no longer in use, allowing the drive to reclaim space and maintain optimal performance over time.
What You'll Need
- A PC running Windows 11 (any edition).
- Administrator access to the system.
- An SSD (Trim only works with solid‑state drives).
- Basic familiarity with Command Prompt or PowerShell (optional but helpful).
Step‑by‑Step
- Open the Start menu, type
cmd, right‑click Command Prompt and choose Run as administrator. If prompted by User Account Control, click Yes to grant permission. - First, verify the current Trim status. In the elevated Command Prompt, type:
fsutil behavior query DisableDeleteNotify
Press Enter. A response ofDisableDeleteNotify = 0means Trim is already enabled. If the result shows1, Trim is disabled and needs to be turned on. - To enable Trim, type the following command and press Enter:
fsutil behavior set DisableDeleteNotify 0
You should see a confirmation message likeDisableDeleteNotify = 0. This tells Windows to send the TRIM command to compatible drives. - Confirm the change by re‑running the query command from step 2. The output should now read
DisableDeleteNotify = 0. If it still shows1, repeat step 3 and ensure you are running the command in an elevated window. - Next, schedule regular SSD optimization so Windows automatically runs TRIM on a weekly basis. Open Settings (Windows + I), navigate to System → Storage → Advanced storage settings → Optimize Drives. In the window that appears, select your SSD from the list and click Change settings. Ensure the Run on a schedule box is checked and the frequency is set to Weekly. Click OK to save.
- If you prefer PowerShell, you can achieve the same result with the following command (run PowerShell as administrator):
Enable-PhysicalDisk -DeviceId (Get-PhysicalDisk | Where-Object MediaType -EQ "SSD").DeviceId
This cmdlet forces Windows to treat the identified SSD as TRIM‑capable. - Finally, verify that the scheduled optimization task is active. Open the Task Scheduler (type
Task Schedulerin the Start menu), expand Task Scheduler Library → Microsoft → Windows → Defrag. Locate the task named ScheduledDefrag and ensure its status is Ready and the next run time is in the future.
Common Mistakes
- Running the command without admin rights: The
fsutilutility requires elevated privileges; otherwise you will receive an "Access is denied" error. - Attempting to enable Trim on a mechanical HDD: Traditional hard drives do not support TRIM, so the command will have no effect and may cause confusion.
- Disabling scheduled optimization: Even if Trim is enabled, turning off the weekly optimization task can lead to slower write performance over time.
- Using the wrong command syntax: Misspelling
DisableDeleteNotifyor using a space where a dash belongs will result in an "Invalid parameter" message. - Assuming third‑party disk utilities automatically enable Trim: Some third‑party tools manage their own defragmentation schedules but do not necessarily send the TRIM command; you still need to verify the Windows setting.
Tips
- Keep your SSD firmware up to date. Manufacturers often release firmware that improves TRIM handling and overall endurance.
- Periodically run
winsat diskfrom an elevated Command Prompt to benchmark SSD performance and see if Trim is having the desired effect. - If you have multiple SSDs, repeat the PowerShell cmdlet for each device ID to ensure every drive receives the TRIM instruction.
- Use the built‑in Storage Sense feature (Settings > System > Storage) to automatically free up space; it works in tandem with Trim to keep the drive healthy.
- Avoid disabling hibernation or fast startup if you rely on TRIM, as these features can sometimes interfere with the timing of the scheduled optimization task.
Troubleshooting
If Trim does not appear to be working after following the steps above, try the following checks in order:
- Restart the computer. A simple reboot often applies the new FSUTIL setting and re‑initialises the optimization service.
- Confirm the drive type. Open Device Manager (right‑click Start > Device Manager), expand Disk drives**, and verify that the listed device includes "SSD" in its description. If it shows "HDD" or "Hybrid", Trim is not applicable.
- Check for Windows updates. Some updates contain fixes for storage management. Go to Settings > Windows Update and install any pending updates.
- Run the built‑in SSD health check. Open PowerShell as admin and execute:
Get-PhysicalDisk | Format-Table FriendlyName, MediaType, OperationalStatus, HealthStatus
Ensure theHealthStatusreadsHealthy. If it reportsWarningorUnhealthy, the drive may be failing, which can prevent TRIM from executing correctly. - Verify the scheduled task. In Task Scheduler, right‑click the ScheduledDefrag task and select Run. After it finishes, open Event Viewer (Windows Logs > Application) and look for entries from "Defrag" indicating success or error codes.
- Re‑apply the command. Occasionally the setting reverts after a major Windows feature update. Run
fsutil behavior set DisableDeleteNotify 0again and then re‑check the status. - Reset the optimization service. Open Services (type
services.msc), locate Optimize drives, stop it, then start it again. This forces Windows to reload the service configuration.
If none of the above resolves the issue, consider contacting the SSD manufacturer’s support channel, as some proprietary drives require a vendor‑specific utility to enable TRIM.
Frequently Asked Questions
Is Trim enabled by default on Windows 11?
Yes, Windows 11 automatically enables Trim for any SSD it detects, but verifying the setting ensures it has not been unintentionally disabled by third‑party software.
Can I enable Trim on an external USB SSD?
External SSDs connected via USB generally support TRIM, but the feature works only if the drive uses the USB 3.0 (or newer) protocol and the Windows storage stack passes the command. Use the same fsutil command to verify.
Will enabling Trim reduce the lifespan of my SSD?
No. Trim actually extends SSD lifespan by allowing the controller to erase unused blocks in bulk, reducing write amplification.
Do I need third‑party utilities like Samsung Magician to enable Trim?
Not for basic TRIM functionality. The built‑in Windows commands are sufficient. Manufacturer tools may offer additional diagnostics but are optional.
How can I tell if TRIM is actually being executed?
Run fsutil behavior query DisableDeleteNotify to confirm it is enabled, then check the Event Viewer for entries from "Defrag" that mention "TRIM". You can also monitor SSD write amplification using the vendor’s utility.