Skip to main content
RebootDoctor

How to Defragment a Drive on Windows 11

By Mike Chen Fact-checked by Mike Chen (CompTIA A+ Certified) on

Short answer: Type 'defragment' in Start and open Defragment and Optimize Drives. Select a drive and click Optimize. On a mechanical hard drive this runs a real defragment, reorganizing fragmented files; on an SSD it sends a TRIM command instead, which is correct — Windows knows the difference and will not wear out an SSD by defragging it. Modern Windows already schedules this weekly.

Type “defragment” in Start and open “Defragment and Optimize Drives.” It shows every drive, its media type (SSD or hard drive), and when it was last optimized. Select a drive, click Optimize. For hard drives it runs a traditional defragment — reorganizing fragmented files into contiguous blocks. For SSDs it sends a TRIM command instead, which tells the SSD which blocks are free so it can manage wear leveling properly. Windows knows the difference and won’t defrag an SSD.

That last part matters because people keep asking. No, Windows 11 does not defragment your SSD. The “Optimize” button on an SSD sends TRIM, which is healthy and takes a few seconds. Traditional defragmentation — moving data blocks around — would wear out SSD cells faster for no benefit because SSDs have no seek time. Random access is just as fast as sequential. If someone told you to defrag your SSD, they’re thinking of hard drives.

Windows runs optimization automatically once a week. Check the “Scheduled optimization” section at the bottom of the Optimize Drives window. If it says “On” and shows a recent date, you don’t need to do anything manually. If it says “Off” or the last run was months ago, click “Change settings” and turn it on. Set the frequency to Weekly, make sure all drives are checked.

When Defrag Actually Helps

Hard drives — spinning disks with a physical read head. When files get fragmented across the platter, the head has to jump around to read them, which takes real time. A badly fragmented hard drive can feel noticeably sluggish for file operations. Defragmenting puts everything back in order.

If you’re still running a hard drive as your boot drive in 2026, defragmenting helps but you’re solving the wrong problem. A 1TB SATA SSD is $60. Cloning your existing drive takes about an hour. The speed difference between a hard drive and an SSD is not 20% — it’s 10-50x for random reads. Our cloning guide walks through the process, and it’s the single biggest upgrade you can make to an old computer.

For secondary hard drives — external backup drives, NAS storage, game libraries on spinning rust — defragmentation still provides a genuine benefit for large sequential reads. Video editing off a hard drive, loading large game maps, accessing backup archives. Run it manually every month or two on drives that don’t stay connected long enough for automatic scheduling.

TRIM and SSD Health

SSDs don’t fragment in the traditional sense, but TRIM is important. Without TRIM, the SSD doesn’t know which blocks are free, so when it needs to write new data it has to read-erase-write instead of just writing to a known-free block. This slows writes over time and increases cell wear. TRIM keeps the SSD informed so it can write efficiently.

Check if TRIM is enabled: open Command Prompt as admin, run fsutil behavior query DisableDeleteNotify. If it returns DisableDeleteNotify = 0, TRIM is enabled. If it returns 1, run fsutil behavior set DisableDeleteNotify 0 to enable it.

If your SSD feels slower than when it was new, check how full it is. SSDs slow down significantly above 90% capacity because the controller runs out of free blocks for wear leveling and garbage collection. Free up space to keep at least 10-15% free. If the slowdown is severe and the drive has been at high capacity for a long time, a secure erase and fresh Windows install resets the NAND to factory performance — but that’s a nuclear option. Check the drive’s health first.

Frequently Asked Questions

Does Windows 11 defragment SSDs?

No. When you click Optimize on an SSD, Windows sends a TRIM command — not a defragment. TRIM tells the SSD which blocks are free so it can manage wear leveling properly. Traditional defragmentation moves data blocks around, which would wear out SSD cells faster for zero benefit since SSDs have no seek time penalty.

How often should I defragment my hard drive?

Windows 11 runs optimization automatically once a week by default. Check Defragment and Optimize Drives from Start — if Scheduled optimization shows 'On' with a recent date, you're already covered. Manual defrag is only needed on drives that aren't connected during the scheduled window, like external hard drives.

Will defragmenting make my computer faster?

Only if you have a hard drive (spinning disk). Defragmenting a fragmented hard drive improves file access speed because the read head doesn't have to jump around the platter. But if your boot drive is a hard drive in 2026, upgrading to an SSD ($60 for 1TB) is 10-50x faster than any amount of defragmenting.

How do I check if TRIM is enabled for my SSD?

Open Command Prompt as admin and run fsutil behavior query DisableDeleteNotify. If it returns 0, TRIM is enabled. If it returns 1, enable it with fsutil behavior set DisableDeleteNotify 0. TRIM should always be on for SSDs — without it, write performance degrades over time.

Need Expert Help?

If these steps didn't fix your issue, our certified technicians can diagnose and resolve it remotely — usually in under 30 minutes.