Disk Defrag Stuck at 0% – Fix in 5 Minutes

Hardware – Hard Drives Beginner 👁 10 views 📅 Jun 23, 2026

Your defrag is frozen at 0%. The fix is simple: stop the service, delete the temp files, restart. Here's how.

Why Your Defrag Is Stuck at 0%

You click defrag, the bar shows 0%, and nothing happens for 10 minutes. I've seen this on hundreds of machines. The reason is almost always a corrupted temporary file that the defrag tool uses to track progress. It's not a hardware problem. You don't need a new hard drive. You just need to clean out those temp files.

Fix 1: The Quick Cleanup (Works 90% of the Time)

This fix takes 2 minutes. You'll need admin rights. If you don't have them, ask your IT person.

  1. Close the defrag window. Don't worry, it won't break anything.
  2. Press Windows Key + R to open the Run box.
  3. Type services.msc and press Enter. You'll see a list of all services.
  4. Scroll down to Optimize Drives (or in older Windows, Disk Defragmenter).
  5. Right-click it and choose Stop. After clicking Stop, you should see the Status column go blank. If it was already stopped, that's fine too.
  6. Open File Explorer. In the address bar, paste this path and press Enter:
    C:\Windows\Prefetch
  7. You'll see a bunch of files. Delete everything inside the Prefetch folder. Windows might ask for admin permission – click Yes. Some files won't delete because they're in use. That's okay. Delete what you can.
  8. Now go back to the Services window. Right-click Optimize Drives again and choose Start. After starting, the Status should show Running.
  9. Open the defrag tool (search for "defragment" in the Start menu). Select your drive and click Optimize.

After these steps, the defrag should start moving past 0% within 30 seconds. If it doesn't, try the next fix.

Fix 2: The Command Line Reset (When Fix 1 Fails)

If the first fix didn't work, the temp file might be in a different location. Here's the nuclear option.

  1. Open Command Prompt as admin. Right-click the Start button and choose Command Prompt (Admin) or Windows PowerShell (Admin).
  2. Type this command and press Enter:
    net stop defragsvc
    You should see a message: "The Optimize Drives service is stopping." Then "The Optimize Drives service was stopped successfully."
  3. Now type:
    del /f /s /q %systemroot%\Prefetch\*.*
    This deletes all Prefetch files, even ones that were locked. The screen will just show a new command line – that means it worked.
  4. Type:
    net start defragsvc
    You'll see "The Optimize Drives service is starting." Then "The Optimize Drives service was started successfully."
  5. Close the command window. Run defrag again. It should work now.

Why This Works

The defrag tool writes temporary files to the Prefetch folder. When those files get corrupted – usually from a crash or improper shutdown while defrag was running – the tool reads the corrupt file and gets stuck. Deleting those files forces the defrag tool to create fresh ones. It's like clearing a jammed printer queue. The same logic applies to Windows 10, Windows 11, and even Windows 8.

Less Common Variations

Sometimes the issue is different. Here are two edge cases I've run into.

Third-Party Defrag Software

If you're using software like Auslogics or Defraggler, that program might have its own cache. Uninstall the third-party tool, reboot, and use the built-in Windows defrag. The built-in tool is actually better for modern SSDs – it runs TRIM instead of defrag. Don't defrag an SSD. Windows knows this and won't let you, but third-party tools sometimes try and fail.

Drive With Less Than 5% Free Space

Defrag needs free space to move file fragments around. If your drive is 95% full, the tool can't work. Check your free space. If you have less than 5% free, delete some files or move them to an external drive. Then try defrag again.

SSD Optimization Stuck

If you have an SSD, Windows doesn't defrag it – it runs a TRIM command. But TRIM can also get stuck. The fix is the same: stop the Optimize Drives service, delete Prefetch files, restart the service. It works the same way.

Prevention Tips

To stop this from happening again, do two things.

  1. Never force shut down your PC during defrag. If defrag is running, let it finish. If you must shut down, use the Start menu's Shut Down option – don't hold the power button.
  2. Set up a scheduled defrag. Windows already does this by default once a week. Check it's on. Go to the defrag tool, click Change settings, and make sure "Run on a schedule" is checked. Weekly is fine. If you defrag manually every day, you're more likely to hit this bug.

That's it. You shouldn't need to do this more than once every few years. But if you see 0% again, you now know the fix.

Was this solution helpful?