How to Manually Trim an SSD on Windows 11 for Better Performance
🔍 WiseChecker

How to Manually Trim an SSD on Windows 11 for Better Performance

Quick fix: Open Terminal (Admin) and run Optimize-Volume -DriveLetter C -ReTrim -Verbose. This sends a fresh TRIM command to every free block on the SSD — tells the controller which blocks can be safely erased. Schedule for every 1–2 months on heavily-used SSDs to maintain peak write performance.

Windows runs TRIM automatically on a weekly schedule by default, but on heavily-used SSDs (multi-TB writes per week), more frequent TRIM helps. Running it manually before benchmarks, after large deletes, or as part of maintenance keeps write speeds at maximum.

Symptom: Want to manually run TRIM on an SSD to maintain or restore write performance.
Affects: Windows 11 (and Windows 10) with NVMe or SATA SSDs.
Fix time: ~5 minutes per drive.

ADVERTISEMENT

What causes this

SSDs can only erase whole blocks (typically 256 KB–4 MB), but writes happen at page level (4 KB). When you delete a file, Windows marks the data area as free but doesn’t physically erase the blocks — the SSD doesn’t know which blocks are reusable. TRIM tells the SSD which logical addresses are now free, so the controller can pre-erase those blocks during idle time. Without TRIM, the SSD must read-modify-erase-write for every new write, dramatically slower.

Method 1: Run TRIM via Optimize-Volume

The PowerShell command.

  1. Open Terminal (Admin).
  2. Run TRIM on a specific drive:
    Optimize-Volume -DriveLetter C -ReTrim -Verbose

    The -ReTrim flag re-runs TRIM on all free blocks (more thorough than incremental TRIM).

  3. For all SSDs:
    Get-Volume | Where-Object DriveType -eq Fixed | ForEach-Object { Optimize-Volume -DriveLetter $_.DriveLetter -ReTrim -Verbose }
  4. Verbose output shows TRIM progress: blocks trimmed, time taken.
  5. To analyze without trimming: Optimize-Volume -DriveLetter C -Analyze -Verbose.
  6. For NTFS-mounted ReFS volumes: same command works.
  7. For Storage Spaces virtual disks: TRIM happens at the underlying physical drive level, not the virtual.

This is the canonical TRIM command. Use after large deletes or as periodic maintenance.

ADVERTISEMENT

Method 2: Use Defragment and Optimize Drives GUI

For GUI users.

  1. Search Start menu for Defragment and Optimize Drives. Open.
  2. Select your SSD. Click Optimize.
  3. Windows detects SSD vs. HDD automatically. For SSDs, it runs TRIM. For HDDs, it defragments.
  4. Progress bar shows TRIM running. Takes 30 seconds to 2 minutes per SSD.
  5. After completion, Status shows OK with last-trim timestamp.
  6. Configure schedule: Change settings → tick Run on a schedule (recommended). Default Weekly. For heavily-used SSDs, no need to change — weekly is enough.
  7. For multiple drives: tick Choose drives and pick which to include in scheduled optimization.

This is the GUI equivalent. Less verbose than PowerShell but functionally identical.

Method 3: Use vendor SSD utility for extended health

For more than just TRIM — vendor utilities offer firmware updates, over-provisioning, secure erase.

  1. Identify SSD vendor: Device Manager → Disk drives → right-click SSD → Properties → Details tab → Hardware Ids. Find vendor name.
  2. Download the vendor’s SSD management software:
    • Samsung: Samsung Magician
    • Crucial: Crucial Storage Executive
    • Western Digital: WD Dashboard (or SanDisk SSD Dashboard for SanDisk-branded)
    • Kingston: Kingston SSD Manager
    • Sabrent: Sabrent Rocket Toolbox
  3. Install. Launch. The app shows:
    • Drive health via SMART data.
    • Firmware update: install for stability and performance improvements.
    • Over-provisioning: reserve a percentage of capacity as unused. Improves sustained write performance.
    • Secure erase: full reset of the drive’s flash.
  4. Run vendor TRIM/optimize if available. Often more efficient than Windows’s generic TRIM because it knows the SSD’s controller behavior.
  5. For SSDs without vendor utility: use the open-source SSD-Z or HD Sentinel for monitoring.

This is the right path for SSD enthusiasts and for maintaining drive longevity.

How to verify the fix worked

  • Run Optimize-Volume -DriveLetter C -ReTrim -Verbose. Output shows blocks trimmed in MB or GB.
  • Open Defragment and Optimize Drives. Last Run shows current date/time.
  • Run a benchmark (CrystalDiskMark): write speed should match or exceed pre-trim levels. Heavily-written SSDs often show 10–30% write speed recovery after TRIM.

If none of these work

If TRIM fails with errors: TRIM disabled at OS level: run fsutil behavior query DisableDeleteNotify. Should be 0. If 1, enable: fsutil behavior set DisableDeleteNotify NTFS 0. Reboot. SSD via USB-SATA bridge: some USB-SATA bridges don’t support TRIM passthrough. Connect via SATA directly. RAID volumes: TRIM in RAID is controller-dependent. Some hardware RAID controllers strip TRIM. Check controller documentation. For SSDs that show high “Wear” percentage: TRIM helps but can’t reverse cell wear. Plan replacement. For drives that get full quickly during TRIM: the drive may be near capacity. Free up space (target <90% full) before TRIM for better results. For NVMe drives with NVMe deallocate vs. TRIM: Windows uses TRIM for SATA SSDs and NVMe deallocate for NVMe; same effect, different command. Both run via Optimize-Volume.

Bottom line: Optimize-Volume -DriveLetter C -ReTrim -Verbose manually triggers TRIM on demand. Schedule remains weekly by default; manual runs for maintenance or before benchmarks.

ADVERTISEMENT