Optimize and Defrag Drives in Windows 11 and 10: SSDs, Hard Drives, Schedule and Commands
To optimize or defragment drives in Windows 11, open Start and search for Defragment and Optimize Drives, or press Windows + R and run dfrgui. Select a drive and choose Optimize. Windows does the right thing for each type of drive. For a hard drive, it defragments, putting scattered pieces of files back together. For an SSD, it sends TRIM, telling the drive which blocks are free, and does not defragment it. So yes, it is safe to click Optimize on an SSD, but you should not defragment an SSD with third-party tools. Windows already runs this automatically every week. Check that Scheduled optimization says On, and you rarely need to do anything else. From the command line, defrag C: /O or Optimize-Volume -DriveLetter C does the same.
Ethan's family PC had become slow, and a forum post told him to "defrag everything" with a free defragmenter that promised to make his PC "like new". Before installing it, he asked Jake. Jake opened Optimize Drives instead. The PC had two drives: a fast SSD for Windows, which needed no defragmenting at all, and an old hard drive full of photos, which was 23 percent fragmented. The scheduled optimization had been turned off years ago, probably by a "tune-up" tool. Jake turned the schedule back on and optimized the hard drive, which took about forty minutes. He also explained that the real slowness was a nearly full SSD, and they freed 40 GB that afternoon. The PC was quicker that evening, and no third-party defragmenter was needed. This page explains what Optimize Drives does, how to use it on SSDs and hard drives, the schedule, the command line, why some drives say optimization is not available, and when defragmenting actually helps.
What Optimize Drives does
Optimize Drives, called Disk Defragmenter in older Windows, keeps your drives working efficiently. What that means depends on the kind of drive, and Windows detects the type and does the right thing automatically.
On a hard disk drive, with spinning platters and a moving read head, files can become fragmented: stored in many pieces scattered across the disk, because they were saved or grew when there was no single free space large enough. Reading a fragmented file means the head jumps around, which is slow. Defragmenting rearranges the pieces so each file is stored in one continuous run, and also consolidates free space, so new files are less likely to fragment. On a hard drive, this can noticeably speed up opening large files and starting Windows.
On a solid-state drive, there is no moving part, and reading scattered pieces is nearly as fast as reading continuous ones, so fragmentation hardly matters for speed. What does matter is TRIM: a message from Windows telling the SSD which blocks no longer hold data, because files were deleted. The SSD uses that information to prepare blocks in advance and manage wear, keeping write speeds high over the drive's life. Optimize Drives sends TRIM for the whole drive, called a retrim, rather than defragmenting.
Windows runs this maintenance automatically, on a schedule, as part of its background tasks. For most people, the only job is to make sure the schedule is on and to leave it alone.
How fragmentation happens
Fragmentation is a side effect of everyday use. When Windows saves a file, it looks for free space on the drive. On a fresh drive, free space is one big continuous area, and files are stored neatly. Over time, as files are deleted, they leave gaps of various sizes. A new file that is larger than any single gap gets split across several gaps, and a file that grows, such as a mailbox, a database or a log file, gets new pieces wherever space is free when it grows.
The fuller the drive, the smaller and more scattered the gaps, and the faster fragmentation builds up. That is why nearly full hard drives fragment badly, and why freeing space helps both performance and defragmentation. Certain workloads fragment heavily: downloading many large files at once, editing video, running virtual machines, and email programs that store everything in one large file.
Windows' NTFS file system tries to reduce fragmentation by placing files sensibly, and the weekly optimization repairs what builds up. On SSDs, fragmentation still happens at the file system level, but because SSDs internally spread data across their memory chips anyway and read any location equally fast, it has little effect on speed.
Open Optimize Drives and optimize a drive
- Select Start, type defrag, and open Defragment and Optimize Drives. Or press Windows + R, type
dfrguiand press Enter. - The window lists your drives with their Media type, Last run date and Current status.
- Select a drive and choose Analyze to check fragmentation on a hard drive. For SSDs, Analyze may be unavailable, since fragmentation analysis is not meaningful there.
- Choose Optimize. Windows defragments a hard drive or retrims an SSD. Progress appears in the Current status column.
- When it finishes, the status shows OK, with the fragmentation percentage for hard drives.
You can keep using the PC while it runs, though a hard drive being defragmented will feel slower. To optimize several drives, hold Ctrl and select them, then Optimize. You can also reach the tool from File Explorer: right-click a drive, choose Properties, open the Tools tab, and select Optimize. You need administrator rights to optimize.
The Media type column is important: it shows whether Windows sees the drive as a Solid state drive or a Hard disk drive, which decides what Optimize does. If it says the wrong type, or Unknown, see the troubleshooting section below.
| Status or column | What it means |
|---|---|
| Media type: Solid state drive | Optimize sends TRIM; no defragmentation |
| Media type: Hard disk drive | Optimize defragments |
| OK (0% fragmented) | A hard drive in good shape |
| Needs optimization | Fragmentation or a missed retrim; run Optimize |
| Optimization not available | The drive or file system cannot be optimized here |
| Last run: Never run | The schedule is off or the drive is new |
What Optimize Drives does not do
It helps to know the tool's limits, since its name promises a lot. Optimize Drives does not free disk space; that is the job of Storage settings, Storage Sense and Disk Cleanup. It does not repair file system errors; chkdsk does that. It does not check whether a drive is failing; drive health in Settings and manufacturers' utilities do that. It does not speed up the internet, clean the registry, or remove unwanted software, whatever third-party "optimizer" suites bundled with defragmenters may suggest.
What it does, rearranging hard drive data and retrimming SSDs, it does well and automatically. Pair it with occasional free space cleanup, a monthly glance at drive health and reliable backups, and you have covered everything a drive needs from you.
Should you defrag an SSD?
No, and Windows does not. When you select Optimize on an SSD, Windows sends TRIM, which is exactly what an SSD needs, and finishes in seconds to a minute. That is safe and beneficial, and it is what the weekly schedule does too.
Traditional defragmentation of an SSD, by moving files around to make them continuous, brings no real speed benefit, because SSDs read scattered data almost as quickly as continuous data, and it causes unnecessary writes, which use up a little of the SSD's write endurance. That is why the advice "never defrag an SSD" exists. It applies to manual defragmenting with third-party tools that ignore the drive type, not to Windows' Optimize button.
There is one nuance. On SSDs where System Restore or other snapshot features are active, Windows may occasionally perform a light defragmentation, about once a month, to keep the file system's internal structures within limits that snapshots require. This is deliberate, uses very few writes, and is nothing to worry about. Modern SSDs are rated for far more writes than this maintenance adds.
The practical rule: let Windows handle SSDs, keep the schedule on, and do not install third-party defragmenters. If you want to check the SSD's health, use the drive's properties in Settings, as described further down, not a defragmenter.
SSD wear and endurance in plain terms
SSDs store data in memory cells that wear slightly each time they are written, which is why unnecessary writes, such as needless defragmenting, are discouraged. In practice, modern SSDs are rated for hundreds of terabytes written, or more, over their warranty, which at typical home use of tens of gigabytes a day takes many years to reach. The drive's controller also spreads writes evenly across cells, a technique called wear leveling, so no single area wears out early.
TRIM helps here too: by telling the SSD which blocks are free, it lets the controller manage wear and garbage collection efficiently, reducing the extra internal writes the drive would otherwise make. That is why Windows' weekly retrim is beneficial rather than harmful.
The bottom line is that normal use, Windows maintenance, hibernation files and updates do not meaningfully shorten a modern SSD's life. Drive health readings, described below, show the estimated remaining life if you want reassurance. The things that do shorten SSD life are rare: constant heavy writing, such as some professional video or database workloads, or defects in the drive.
Defragmenting a hard drive
Hard drives benefit from defragmentation, especially ones that are nearly full, hold many large files that change, such as videos and virtual machines, or have not been optimized for a long time. A hard drive under 10 percent fragmented is in good shape; above that, optimization often makes a noticeable difference.
Defragmenting a hard drive takes from a few minutes to several hours, depending on its size, how full and fragmented it is, and its speed. A first defrag after years of neglect can take a long time; later runs, on the weekly schedule, are quick. The process is safe to interrupt: select Stop, and files stay intact, since each file is moved completely before the old copy is released.
Free space matters. Defragmentation needs room to move files, and Windows recommends at least 15 percent free space for a thorough job. On a nearly full hard drive, free up space first, by deleting or moving files, uninstalling unused programs and running Disk Cleanup, then optimize. Our guide to how much free space Windows needs covers the reasoning.
Ethan's photo drive was 23 percent fragmented and 85 percent full. After moving old videos to an external drive and optimizing, it was 0 percent fragmented, and the photo library loaded thumbnails noticeably faster.
Game libraries and large media collections
Games and media libraries are where fragmentation used to hurt most, because game files are large and updates rewrite big chunks of them. On a hard drive, a game library that receives frequent patches fragments quickly, and long loading screens are the result. Regular optimization helps, and Windows' weekly schedule handles it if the library drive is included and connected.
Better still, put games you play often on an SSD. Many modern games are designed with SSD loading speeds in mind, and some recommend or require an SSD. A common arrangement is an SSD for current games and a large hard drive for the rest of the library and for video recordings, with game launchers able to move installed games between drives without downloading them again.
For video editors and photographers, the same logic applies: work on current projects from an SSD, archive finished ones to a hard drive, and let Optimize Drives keep the archive drive tidy.
Check and change the optimization schedule
Windows optimizes drives automatically, weekly by default, using a scheduled task that runs during maintenance, usually when the PC is idle. Checking that it is on is the most useful thing you can do in Optimize Drives.
- In Optimize Drives, look at Scheduled optimization near the bottom. It should say On, with a frequency.
- If it is off, or you want to change it, select Change settings.
- Check Run on a schedule (recommended), and choose Weekly, the default, or Daily or Monthly.
- Leave Increase task priority if three consecutive scheduled runs are missed checked, so a PC that is rarely idle still gets optimized.
- Select Choose to pick which drives are included, and check Automatically optimize new drives.
- Select OK.
Weekly is right for almost everyone. Daily adds little, and monthly is fine for PCs used lightly. If the Last run column shows a date long ago despite the schedule being on, the PC may rarely be idle or may be shut down whenever it would run; leaving it on and idle for an hour occasionally, or plugged in overnight for laptops, lets maintenance catch up.
Third-party "tune-up" and "optimizer" programs sometimes turn off Windows' schedule and replace it with their own. If you uninstall such a program, turn the Windows schedule back on, as Jake did on Ethan's PC.
Automatic Maintenance: when optimization actually runs
Scheduled optimization runs as part of Windows' Automatic Maintenance, a daily window when Windows performs background jobs such as optimization, security scans and system diagnostics. You can see and adjust it in Control Panel, System and Security, Security and Maintenance; expand Maintenance to see the last run, and select Change maintenance settings.
By default, maintenance runs at 2:00 AM if the PC is on and idle; if the PC is off or busy at that time, it runs the next time the PC is idle. The option Allow scheduled maintenance to wake up my computer at the scheduled time lets a sleeping desktop wake for it, which some people like and others find annoying, especially if a PC in a bedroom wakes at night. Laptops usually run maintenance only when plugged in.
You can also start maintenance immediately with Start maintenance on the same page, which is a handy way to catch up after the PC has been off for a while. If optimization never seems to run, check that maintenance is not being blocked by a PC that is always shut down at night and always busy during the day.
Laptops, battery and optimization
On laptops, Windows normally runs scheduled maintenance, including drive optimization, only while plugged in, to avoid draining the battery. A laptop that is always used on battery and charged while off may rarely get optimized. For SSD-based laptops, which most are today, that matters little, since retrims are quick and the drive manages itself well between them.
If your laptop's Optimize Drives shows a last run date weeks ago, leave it plugged in and idle for an hour occasionally, or select Optimize manually while charging. On the rare laptops with hard drives, regular optimization matters more, and plugging in overnight once a week is a simple habit that keeps both maintenance and updates on track.
For laptops that travel, a simple habit covers it: whenever the laptop is charging on a desk overnight, leave it on rather than shut down once a week. Maintenance, updates and optimization then happen while you sleep, and the laptop is ready in the morning.
Encrypted drives and BitLocker
Drives encrypted with BitLocker or Windows device encryption are optimized normally while they are unlocked, which for the system drive is always while Windows is running. Defragmentation and retrim work on the encrypted volume without exposing data, and encryption does not change how often you need to optimize.
External drives protected with BitLocker To Go must be unlocked before Optimize Drives can work on them; while locked, they show as not available. Unlock the drive with its password, then optimize.
One related question comes up often: whether to defragment before turning on BitLocker. It is not necessary. Encrypting a drive does not depend on fragmentation, and Windows encrypts used space, or the whole drive, regardless of how files are arranged. Optimize as usual before or after; neither choice affects encryption.
Optimize drives from Command Prompt and PowerShell
The defrag command runs the same optimization from an administrator Command Prompt; our guide to running Command Prompt as administrator shows how. Its switches choose what to do.
| Command | What it does |
|---|---|
defrag C: /O | Proper optimization for the drive type: TRIM for SSDs, defrag for hard drives |
defrag C: /A | Analyzes fragmentation and reports |
defrag C: /L | Retrims the drive (SSDs) |
defrag C: /D | Traditional defragmentation |
defrag C: /X | Consolidates free space |
defrag /C /O | Optimizes all drives |
add /U /V | Shows progress and a detailed report |
In PowerShell as administrator, Optimize-Volume -DriveLetter C -Verbose performs the right optimization for the drive type, Optimize-Volume -DriveLetter C -ReTrim -Verbose retrims an SSD, -Defrag defragments a hard drive, and -Analyze reports fragmentation. Get-PhysicalDisk | Select-Object FriendlyName, MediaType shows whether Windows sees each disk as SSD or HDD.
The /O switch, or Optimize-Volume without options, is the one to use in scripts, since it never defragments an SSD by mistake.
"Optimization not available" and other problems
Optimization not available. Some drives cannot be optimized here: network drives, many virtual and RAM drives, drives with file systems the tool does not support, and some removable or encrypted volumes while locked. For a USB drive, this is usually harmless. For an internal drive, check that it is formatted as NTFS and not locked by encryption.
Media type shows the wrong type or Unknown. In virtual machines, on some RAID setups and with certain drivers, Windows may not detect the drive type correctly. If an SSD is shown as a hard disk, Optimize would defragment it on schedule; updating the storage controller driver often fixes detection. In virtual machines, the host handles the real disk, and the guest's setting matters less.
Optimize Drives will not open or shows an error. The Optimize Drives service must be able to start; check that Optimize drives in services.msc is set to Manual, not Disabled. Then run sfc /scannow in an administrator Command Prompt to repair system files.
It runs constantly or never finishes. On a nearly full, heavily fragmented hard drive, a first run can take hours. Free space first. If an SSD seems to optimize repeatedly, check the media type; an SSD misidentified as a hard drive would be defragmented.
Last run stays at Never run. The schedule is off, or the PC is never idle during maintenance. Turn the schedule on, and leave the PC idle occasionally.
External drives and USB sticks
External hard drives can be optimized like internal ones if they are formatted with NTFS: connect the drive, open Optimize Drives, select it and choose Optimize. Defragmenting an external hard drive that holds a large photo or video library helps it read faster, just as with internal drives. Keep it connected until the process finishes, or select Stop before unplugging.
USB flash drives and memory cards are flash storage like SSDs, so defragmenting them brings no benefit, and many are formatted with FAT32 or exFAT, which the tool may not optimize. If Optimize Drives shows them as not available or skips them, that is fine. External SSDs in USB enclosures are treated as SSDs when Windows detects them correctly, though some enclosures do not support TRIM, as mentioned in the TRIM section.
New external drives are included in the schedule automatically if Automatically optimize new drives is checked, but only while they are connected during maintenance, so an external drive that is plugged in rarely may never be optimized on schedule. Run Optimize by hand occasionally for those.
Virtual machines and Optimize Drives
Inside a virtual machine, the drives Windows sees are virtual disks stored as files on the host PC. Optimize Drives in the guest may report them as Thin provisioned drive or another type, and retrim operations there can let the host reclaim unused space from dynamically expanding virtual disks, which is useful. Defragmenting a virtual disk inside the guest usually brings little benefit and can make dynamically expanding disk files grow.
The host's own drive is where optimization matters. Virtual disk files are large and change constantly, which fragments hard drives on the host quickly, so hosts with virtual machines on hard drives benefit from regular optimization, while hosts on SSDs need only the normal retrim.
Free space consolidation and shrinking a partition
People often meet Optimize Drives when trying to shrink a partition in Disk Management, for example to make room for another operating system. Disk Management can only shrink a volume down to the position of the last unmovable file, such as parts of the page file, hibernation file or System Volume Information, so the shrink space offered may be far less than the free space shown.
Running defrag C: /X to consolidate free space can move some files toward the start of the drive and increase the shrinkable amount. If unmovable system files still block it, temporarily turning off the page file, hibernation and System Restore, restarting, shrinking, and then turning them back on is a common technique, though it should be done carefully, since those features matter for stability and recovery. On SSDs, the free space consolidation step is less useful, and turning off the system files is the more effective part.
Check that TRIM is enabled
For SSDs, TRIM must be enabled in Windows for both the automatic delete notifications and the weekly retrim to work. It is on by default. To check, open Command Prompt and run fsutil behavior query DisableDeleteNotify. A result of DisableDeleteNotify = 0 for NTFS means TRIM is enabled. If it shows 1, enable it with fsutil behavior set DisableDeleteNotify 0 in an administrator Command Prompt.
TRIM can also be affected by the drive's connection: some USB enclosures and older RAID controllers do not pass TRIM through, in which case Optimize may report that the drive does not support it. For internal SSDs on modern PCs, TRIM simply works, and there is nothing to configure.
Will optimizing make a slow PC faster?
On a PC with an SSD, almost certainly not by itself, because fragmentation is not what makes SSD-based PCs slow. On a PC with a hard drive as the system drive, optimizing can help, sometimes noticeably, but hard drives are slow regardless, and the single biggest improvement is replacing the system hard drive with an SSD.
For slow PCs, these usually matter more than optimization: free space, since a nearly full system drive slows Windows down, especially SSDs; startup apps, which you can review in Task Manager's Startup apps page; background updates, which can make a PC sluggish for an hour after starting; memory, since 4 GB is tight for modern Windows; and malware or unwanted software, which a Microsoft Defender scan checks for. Our guide to a C: drive full for no reason covers freeing space.
That was the real story on Ethan's PC: the SSD was 95 percent full, and freeing 40 GB did more than any defragmenter could. The hard drive optimization was a bonus for the photo library.
Hard drive or SSD: is it time to upgrade?
If your PC still runs Windows from a hard drive, no amount of defragmenting will match the difference an SSD makes. An SSD typically starts Windows several times faster, opens apps almost instantly, and makes updates and upgrades take a fraction of the time. Our guide to how long Windows upgrades take shows how large the gap is for big updates.
SSDs are inexpensive today, and most desktops and many laptops can take one, either replacing the hard drive or alongside it. Cloning tools from SSD makers copy Windows and your files from the old drive to the new one, so you do not need to reinstall. A common setup, like Ethan's, is an SSD for Windows and apps, with an older hard drive kept for photos and archives, where its larger capacity matters more than speed.
Check your PC's type of connection before buying: many laptops and desktops have an M.2 slot for NVMe SSDs, which are fastest, while older PCs use 2.5-inch SATA SSDs, which are still dramatically faster than any hard drive.
Signs a hard drive needs more than optimizing
Defragmenting cannot fix a failing drive, and running long optimizations on one adds stress. Watch for warning signs: clicking, grinding or repeated spinning-up sounds; files that take unusually long to open or fail to copy; Windows freezing for seconds when accessing the drive; and errors in Event Viewer from the disk or Ntfs sources. Optimize Drives or chkdsk reporting problems, or a sudden jump in fragmentation, can also accompany trouble.
If you notice any of these, back up the drive first, before anything else, then check its health with the manufacturer's utility. Replacing a failing hard drive is far cheaper than recovering data from a dead one.
Check your drive's health
Optimize Drives does not check whether a drive is healthy. For that, Windows 11 offers drive health information for many NVMe SSDs in Settings, System, Storage, Advanced storage settings, Disks & volumes: select the drive, then Properties, where Drive health may show estimated remaining life, available spare and temperature. Windows can also warn you with a notification when an NVMe drive reports a problem.
For hard drives and other SSDs, the drive manufacturer's free utility usually shows health and runs tests. chkdsk C: /scan in an administrator Command Prompt checks the file system for errors without taking the drive offline. If a drive shows warnings, back up its data immediately, since no amount of optimizing helps a failing drive.
A two-minute monthly drive check
Jake gives every family he helps the same short monthly routine for drives, and it catches most problems early. Open Optimize Drives and confirm that every drive's Last run is recent and its status is OK. Open Settings, System, Storage and check free space on the system drive, aiming to keep at least 15 to 20 percent free. On Windows 11, glance at drive health in Disks & volumes for NVMe SSDs. And make sure your backups ran, since a drive check is only as useful as the backup behind it.
That is all. Most months, everything is fine, and the check takes less time than reading this paragraph. When something is off, such as a drive never optimized or free space shrinking fast, you find out while it is still an easy fix.
If you look after a relative's PC remotely, the same check works over a Quick Assist session in a couple of minutes, and it is a good excuse to confirm their backups and updates at the same time. Jake does exactly that for Ethan's mother on the first Sunday of each month, and in two years it has caught one nearly full drive and one backup that had quietly stopped running.
Do you need a third-party defragmenter?
For almost everyone, no. Windows' built-in tool handles both SSDs and hard drives correctly, runs automatically, and is maintained with Windows. Third-party defragmenters were useful in the Windows XP era, when the built-in tool was basic, but today they add little and can cause harm: some defragment SSDs unnecessarily, some turn off Windows' schedule, and some are bundled with unwanted software or "PC optimizer" upsells.
The exceptions are rare and specialized, such as optimizing very large hard drive arrays for specific workloads, where IT staff have specific reasons. For a home or office PC, the built-in Optimize Drives is all you need.
Defragmenting myths
Defragmenting carries a lot of folklore from older versions of Windows. Myth: you should defrag every week by hand. Windows already does it on a schedule; manual runs are only for catching up. Myth: defragmenting an SSD makes it faster. It does not, and Windows does not do it; Optimize retrims SSDs instead. Myth: defragmenting fixes a slow PC. On SSD-based PCs, slowness comes from other causes, such as full drives, startup apps and limited memory.
Myth: you must close all programs and not touch the PC while defragmenting. That was advice for Windows 98; modern Windows defragments safely while you work, though a hard drive will feel slower. Myth: 0 percent fragmentation is the goal. A few percent is normal and harmless; Windows aims for good enough, not perfect, to avoid wasting time and wear. Knowing these saves time and keeps you away from tools that promise miracles.
For IT: managing optimization on many PCs
In offices, drive optimization is normally left to Windows' own schedule, which works well on SSD-based fleets. The scheduled task lives under Task Scheduler Library, Microsoft, Windows, Defrag, named ScheduledDefrag, and can be checked or adjusted there, or with scripts that run defrag /C /O during maintenance windows. Management tools can report Optimize-Volume results or the task's last run time across devices.
Common reasons optimization fails across a fleet are third-party disk utilities that disable the task, power policies that never leave PCs idle long enough for maintenance, and virtual desktop images where optimization should be handled at the image or host level. Checking the task's history on a few sample PCs usually reveals the pattern.
Windows 10
Optimize Drives looks and works the same in Windows 10, opened by searching for Defragment and Optimize Drives or running dfrgui. Windows 10 also detects SSDs and retrims rather than defragmenting them, and runs the same weekly schedule. Windows 10 is past its October 2025 end of support except for PCs enrolled in Extended Security Updates; the tool continues to work either way, and moving to Windows 11 on an SSD-based PC changes nothing about drive maintenance.
The command-line tools, defrag and Optimize-Volume, are identical in Windows 10, and the Automatic Maintenance settings are in the same place in Control Panel. If you manage both Windows 10 and Windows 11 PCs, the same checks apply to each: media type correct, schedule on, and last run recent.
Frequently asked questions
How do I defragment my drive in Windows 11?
Open Defragment and Optimize Drives from Start or run dfrgui, select the drive, and choose Optimize.
Should I defrag my SSD?
No. Windows' Optimize sends TRIM to SSDs instead of defragmenting, which is safe. Do not use third-party defragmenters on SSDs.
Is it safe to click Optimize on an SSD?
Yes. For SSDs, Optimize performs a retrim, which helps the drive manage free space and wear.
Does Windows 11 defrag automatically?
Yes. It optimizes drives weekly by default. Check that Scheduled optimization says On.
How long does defragmenting take?
From minutes to several hours on a hard drive, depending on size, fullness and fragmentation. SSD retrims take seconds to a minute.
What does optimization not available mean?
The drive cannot be optimized by this tool, such as network, virtual or some removable drives. It is usually harmless.
How do I check if TRIM is enabled?
Run fsutil behavior query DisableDeleteNotify. A value of 0 means TRIM is enabled.
Can I stop a defrag halfway?
Yes. Select Stop. Files are not damaged, because each is moved completely before the old copy is released.
What is the defrag command in Windows?
defrag C: /O in an administrator Command Prompt optimizes the C: drive correctly for its type.
Will defragmenting speed up my PC?
On a hard drive, it can help. On an SSD, it will not; free space, startup apps and memory matter more.
How often should I optimize my drives?
Weekly, which is the default schedule. There is no need to do it manually.
Why is my SSD shown as a hard disk drive?
Windows did not detect the type, often because of a driver or RAID setup. Update the storage driver.
How much free space does defrag need?
At least 15 percent free is recommended for a thorough defragmentation of a hard drive.
Do I need third-party defrag software?
No. Windows' built-in tool handles SSDs and hard drives correctly and runs automatically.
Does defragmenting delete files?
No. It only rearranges where files are stored on the drive.
Can I defrag an external hard drive?
Yes, if it is formatted as NTFS and connected. Select it in Optimize Drives and choose Optimize.
How do I check SSD health in Windows 11?
Settings, System, Storage, Advanced storage settings, Disks & volumes, Properties shows Drive health for many NVMe SSDs.
What is the PowerShell command to optimize a drive?
Optimize-Volume -DriveLetter C -Verbose, run as administrator.
When does Windows optimize drives automatically?
During Automatic Maintenance, by default at 2:00 AM if the PC is on and idle, or the next time it is idle.
Should I defrag a USB flash drive?
No. Flash drives gain nothing from defragmenting. Windows may skip them in Optimize Drives.
Does defrag help me shrink a partition?
Sometimes. defrag C: /X consolidates free space, but unmovable system files may still limit how far a volume can shrink.
Does defragmenting wear out an SSD?
Traditional defragmenting adds unnecessary writes, which is why Windows retrims SSDs instead. Normal maintenance has no meaningful effect on SSD life.
Is it worth replacing a hard drive with an SSD?
Yes, for the system drive. An SSD speeds up startup, apps and updates far more than defragmenting ever could.
Can I defrag a BitLocker-encrypted drive?
Yes, while it is unlocked. Optimization works normally on encrypted volumes.
Why has my laptop not been optimized recently?
Maintenance usually runs only when plugged in and idle. Leave it charging and idle occasionally, or run Optimize manually.
Should games be on an SSD or a hard drive?
On an SSD for games you play often; loading is much faster. A hard drive is fine for the rest of the library.
Where is the scheduled defrag task?
In Task Scheduler, under Library, Microsoft, Windows, Defrag, named ScheduledDefrag.
Is a little fragmentation a problem?
No. A few percent is normal and harmless. Windows does not aim for zero.
Does Optimize Drives free up disk space?
No. Use Storage settings, Storage Sense or Disk Cleanup to free space. Optimize Drives only rearranges data or retrims.
Is Optimize Drives the same as Disk Cleanup?
No. Disk Cleanup deletes unneeded files; Optimize Drives defragments hard drives and retrims SSDs.
Optimize Drives is one of those Windows tools that works best when you mostly leave it alone. It defragments hard drives, retrims SSDs instead of defragmenting them, and does both automatically every week, as long as the schedule is on. Open dfrgui once to check the schedule and media types, optimize a neglected hard drive by hand if needed, and skip third-party defragmenters. If the PC is slow, look at free space and startup apps first. Ethan's photos load faster, and his SSD has room to breathe.
📌 If you keep one line from this page
Run dfrgui, make sure Scheduled optimization is On, and let Windows defrag hard drives and retrim SSDs by itself.
Optimize on an SSD is safe; third-party defragmenters on an SSD are not needed.
Revision note. Written October 3, 2026, expanding our 2015 guide to Optimize Drives into a complete guide for Windows 11 and 10. It covers what optimization does, using the tool, SSDs and TRIM, defragmenting hard drives, the schedule, Command Prompt and PowerShell, errors, checking TRIM, whether it speeds up a slow PC, drive health and third-party tools. May your drives stay tidy without you thinking about them.