Trim an SSD in Windows 10

Last Update: August 16th, 2022
Article ID: 724282

Windows 10 enables Trim for both internal and USB connected SSDs with supported host controllers, devices, and file systems.  Windows 10 supports Trim on USB storage devices that support UASP (USB Attached SCSI Protocol) and with either NTFS or ReFS file systems.  Some early USB 3 host controllers may not support UASP or Trim correctly.

To check if Trim is enabled in Windows 10 please try the following:

  1. Launch Windows PowerShell with Administrative Permissions ( Right-click on the Start Menu and select "Windows PowerShell (Admin)"
  2. Allow the application to run as administrator through Windows User Account Control
  3. Type in the following command to check the value for DisableDeleteNotify
    fsutil behavior query DisableDeleteNotify
  4. If DisableDeleteNotify is set to 1, we can enable Trim with the following command
    fsutil behavior set DisableDeleteNotify 0

To manually run Trim or to modify the automatic schedule:

  1. Open the Windows 10 Start Menu and type "optimize" into the search box
  2. Select "Defragment and Optimize Drives" app from the search results
  3. The Optimize Drives window shows connected drives that can be optimized
  4. Select the USB connected SSD from the list and then press the "Optimize" button to manually start trim
  5. Use the "Change settings" button to adjust or schedule Trim on the drive

Alternatively Trim can be run manually from the command line:

  1. Launch Windows PowerShell with Administrative Permissions ( Right-click on the Start Menu and select "Windows PowerShell (Admin)"
  2. Allow the application to run as administrator through Windows User Account Control
  3. Type in the following command, where X: is the drive letter of the external device to run Trim at the command prompt
    defrag /o X: