Should You Clean the Registry in Windows 10 with CMD?

No. Windows 10 has no Command Prompt command that “cleans” the registry, and Microsoft has long said it doesn’t support registry cleaners, because deleting the wrong entry can stop Windows from starting. If your PC is slow or showing errors, run sfc /scannow and DISM in Command Prompt to repair Windows files, and use Disk Cleanup to remove junk files.

Applies to: Windows 10. Checked against Microsoft Support on September 28, 2026.

Why cleaning the registry doesn’t help

  • Leftover registry entries are tiny and don’t slow your PC down in any way you’d notice.
  • Deleting or changing the wrong entry can break apps or stop Windows from starting.
  • Free “registry cleaner” downloads can include adware or other unwanted software.

Microsoft says to change only registry values you understand, and to back up first.

Repair Windows files with Command Prompt

  1. Select Start, type cmd, right-click Command Prompt, and select Run as administrator.
  2. Type DISM /Online /Cleanup-Image /RestoreHealth and press Enter. Wait for it to reach 100%.
  3. Type sfc /scannow and press Enter. Wait for the scan to finish.
Administrator Command Prompt after sfc /scannow finished with no integrity violations
Run sfc /scannow (1) and read the result (2).
  1. Restart your PC if the scan says it repaired files.

For more detail, see how to run an SFC scan in Windows 10.

Remove junk files with Disk Cleanup

  1. Select Start, type Disk Cleanup, and open it. Choose drive C: if asked.
  2. Select Clean up system files to include old update files.
  3. Check the items you want to remove, such as Temporary files and Recycle Bin, and select OK.
Disk Cleanup for drive C with Temporary files checked and Clean up system files highlighted
Select Clean up system files (1), check the items (2), then OK.

See how to run Disk Cleanup in Windows 10 for what each item means.

Back up a registry key with CMD

If you’ve been told to change a registry value, save a copy of that key first. In an admin Command Prompt, type a command like this, using the key you plan to change:

reg export "HKCU\Control Panel\Desktop" %USERPROFILE%\Desktop\desktop-backup.reg

This saves the key as a .reg file on your desktop. To put it back, double-click the file and select Yes. You can also export from Registry Editor with File > Export. A restore point is still the safer way to undo bigger changes.

Other ways to speed things up

If the repair commands report problems

  • SFC couldn’t fix some files: run the DISM command again, restart, and then run sfc /scannow once more. Details are saved in %windir%\Logs\CBS\CBS.log.
  • DISM seems stuck: it can sit at one percentage for a long time. Give it at least 30 minutes before you stop it.
  • DISM error 0x800f081f: Windows couldn’t find the repair files. Make sure the PC is online and Windows Update works, or point DISM at matching Windows 10 installation media with /Source.
  • Access denied: the window isn’t running as administrator. Close it and open it again with Run as administrator.

Frequently asked questions

What if I really need to change a registry value?

Make a restore point first so you can undo it. See how to create a restore point in Windows 10. Then change only the one value you were told to change.

Is there a registry cleaner built into Windows 10?

No. Windows 10 doesn’t include one, and Microsoft doesn’t recommend using one.

Can a registry cleaner fix blue screens or crashes?

Not reliably. Crashes usually come from drivers, hardware or damaged system files. Updating drivers, running the repair commands above and checking Windows Update are better first steps.

Does removing old registry entries free up disk space?

Barely. The whole registry is small compared with your drive, so removing leftover entries saves almost nothing. Disk Cleanup and uninstalling unused apps free up far more space, with none of the risk.

One registry value some people do change on purpose is the owner name. See how to change the registered owner name in Windows 10.

Microsoft’s reference is Use the System File Checker tool to repair missing or corrupted system files. More help is on our Windows Help & Guides page.

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy