Windows 11 maintains your drives automatically in the background, but knowing how to run it manually — and understanding the difference between defragmenting an HDD and optimising an SSD — helps you keep your storage in good shape and avoid accidentally doing the wrong thing to the wrong drive type.
HDD vs SSD: Different Optimisation, Same Tool
The type of drive determines what Windows does when you click Optimise:
- HDD (Hard Disk Drive): Windows runs defragmentation — it reorganises fragmented files so they are stored in contiguous blocks, reducing read times
- SSD (Solid State Drive): Windows runs TRIM — a command that tells the SSD which blocks of data are no longer needed, allowing the drive to reclaim them efficiently. SSDs should never be defragmented; TRIM is the correct operation.
- NVMe SSD: Same as SSD — Windows sends TRIM commands. No defragmentation.
Windows correctly detects your drive type and applies the right operation automatically. You cannot accidentally defragment an SSD using the built-in tool.
How to Optimise a Drive Manually
- Press Win + S and search for Defragment and Optimise Drives
- In the Optimise Drives window, select the drive you want to optimise
- Click Optimise
The Current status column shows the fragmentation level for HDDs and the last optimisation date for SSDs. The Media type column confirms whether Windows sees the drive as an HDD, SSD, or Removable drive.
Alternatively, open it from File Explorer: right-click a drive → Properties → Tools tab → Optimise.
How to Check the Automatic Optimisation Schedule
Windows 11 optimises drives on a schedule automatically. To check or change it:
- Open Optimise Drives
- Click Change settings under Scheduled optimisation
- Confirm Run on a schedule is ticked
- Set the frequency: Daily, Weekly (default), or Monthly
- Tick Increase my task priority if I miss scheduled runs for three consecutive days — this catches up if the PC was off during the scheduled time
Weekly is the right setting for most users. Daily is only necessary for HDDs on PCs that handle large amounts of file churn.
How Fragmented is Too Fragmented?
For HDDs, the fragmentation percentage shown in Optimise Drives indicates how fragmented the drive is:
- 0–5%: Good — no action needed
- 5–15%: Some fragmentation — consider optimising
- 15%+: Noticeable performance impact — optimise now
For SSDs, the percentage shown is not fragmentation — it represents a different metric related to free space mapping. Do not use this figure to judge whether an SSD needs attention.
Optimising Drives via Command Prompt
Open Command Prompt as Administrator:
defrag C: /U /V
Flags:
/U— show progress/V— verbose output with fragmentation statistics/A— analyse only, do not optimise/O— perform the correct optimisation for the drive type (same as clicking Optimise in the GUI)
To run TRIM on an SSD from Command Prompt:
defrag C: /L
The /L flag sends the TRIM command (retrim) to the SSD.
When Defragmentation Helps and When It Does Not
Defragmentation helps when:
- You have an HDD and file read times seem slow
- The drive shows 10%+ fragmentation and has not been optimised recently
- You have just moved large numbers of files around or deleted a lot of data
Defragmentation does not help when:
- Your drive is an SSD — TRIM is already handled automatically and manually running it rarely makes a measurable difference
- Your PC is slow due to low RAM or a slow CPU — defragmentation only helps disk read performance
- The drive is nearly full — fragmentation increases significantly when a drive is over 90% full. Freeing up space is more effective than defragmenting.
Related Guides
- How to Check Disk Usage in Windows 11
- How to Speed Up Windows 11
- Windows 11 Running Slow After Update
Checking Drive Health with SMART Data
Before optimising a drive, it is worth checking whether it is healthy. Windows includes a basic drive health check via PowerShell. Open PowerShell as Administrator and run:
Get-PhysicalDisk | Select FriendlyName, HealthStatus, OperationalStatus, Size
A healthy drive returns Healthy for HealthStatus. If it shows Warning or Unhealthy, back up your data immediately — the drive may be failing.
For more detailed SMART data (temperature, reallocated sectors, pending sectors), use a free tool like CrystalDiskInfo. It reads the drive’s built-in diagnostics and flags any attributes that indicate early failure. Optimising a failing drive is pointless and wastes the time you could spend replacing it and restoring from backup.
External Drives and USB Drives
External HDDs benefit from defragmentation just like internal ones — they appear in Optimise Drives and can be selected and optimised manually. However, USB flash drives are excluded from scheduled optimisation by default because they have limited write cycles. Defragmenting a USB flash drive repeatedly shortens its lifespan without meaningful performance benefit.