Windows command guide
Fix Windows Update error 0x80070002
Error 0x80070002 often appears when Windows Update expects files that are missing, out of sync, or stuck in a bad cache state. The fastest useful approach is usually resetting the update download stores and then checking system file integrity.
This guide is written around the specific symptom-command match for fix windows update error 0x80070002, not as a generic dump of terminal lines. That makes the page more useful for real troubleshooting and reduces the chance of running the wrong repair step.
net stop wuauserv
net stop bits
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
net start bits
net start wuauserv
sfc /scannow
Best place to run it
Elevated Command Prompt is the right execution context for this page. Because this repair touches protected Windows state, a normal unelevated shell can return misleading access errors or partial results.
Fast repair workflow
- Start from the exact symptom on this page: Windows Update repeatedly fails with 0x80070002
- Run the primary repair line exactly as shown: net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 catroot2.old net start bits net start wuauserv sfc /scannow.
- This workflow is tuned for this repair, so avoid mixing it with unrelated repair commands too early.
- Reboot if the servicing stack or protected files were changed, then retry the original Windows action.
- Escalate only after reading the output, usually toward CBS.log, DISM source repair, or Windows Update-specific repair.
Copyable wrapper script
Use this wrapper when you want the page command inside a clearer script block with start and finish prompts.
@echo off
echo Run this CMD sequence in an elevated Command Prompt.
echo Starting targeted repair sequence...
net stop wuauserv
net stop bits
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
net start bits
net start wuauserv
sfc /scannow
echo.
echo Review the output before closing this window.
pause
Verification commands after the repair
These follow-up commands help you check whether the repair actually changed the Windows state that matters, instead of assuming success from a single line.
findstr /c:"[SR]" %windir%LogsCBSCBS.log
sfc /verifyonly
What problem this command is trying to solve
This page focuses on update cache corruption, missing update payload files, and stale servicing data that keeps Windows Update from matching the files it expects.
- Windows Update repeatedly fails with 0x80070002.
- The same update retries after reboot without completing.
- Resetting SoftwareDistribution often helps more than simply clicking Retry.
How the command works
The commands stop update services, rename the two most common damaged cache folders, restart update services, and then run SFC to confirm the operating system files themselves are intact.
When it makes sense to run it
Use it when the update pipeline is stuck on the same code and the machine has already been rebooted at least once.
Before you run this command
- Open an elevated Command Prompt or PowerShell window before running net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 catroot2.old net start bits net start wuauserv sfc /scannow.
- Confirm that the symptom really matches this guide, especially if you are seeing signs such as: windows update repeatedly fails with 0x80070002.
- Keep any exact DISM, SFC, CBS, or Windows Update error output because those details matter in the next step.
What result to expect
After running net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 catroot2.old net start bits net start wuauserv sfc /scannow, compare the result against the symptom that brought you here. The most useful checkpoint is whether windows update repeatedly fails with 0x80070002 becomes less frequent, changes form, or produces a clearer error message. A command page is stronger when it helps you verify a real change instead of just assuming the line must have worked.
How to verify that it worked
The best verification step after net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 catroot2.old net start bits net start wuauserv sfc /scannow is to repeat the action that previously triggered the problem. If the same update retries after reboot without completing still appears in exactly the same way, the command probably was not the whole answer and you should move to the next targeted check instead of assuming the page is finished.
Why administrator rights matter here
This command changes system integrity and component corruption. Run it in an elevated shell so Windows can apply the repair instead of only returning an access or privilege error.
Before you run it
Renaming the update cache folders forces Windows to rebuild them. The next update scan can take longer than usual.
When this is probably the wrong fix
This is not the right first fix for a single third-party app bug, a browser-only issue, or obvious hardware failure. Use it when the symptom points to Windows image health, recurring update corruption, or protected system files.
What to do if it does not help
If net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 catroot2.old net start bits net start wuauserv sfc /scannow does not improve windows update repeatedly fails with 0x80070002, move to the next repair step that matches the same symptom family instead of piling on random commands. The best follow-up depends on whether the failure is mainly about system integrity and component corruption.
Frequently asked questions
Should I use net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 catroot2.old net start bits net start wuauserv sfc /scannow for this exact Windows symptom?
Use it when the behavior on your PC lines up with the repair target on this page: This page focuses on update cache corruption, missing update payload files, and stale servicing data that keeps Windows Update from matching the files it expects.
What should I check right after net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 catroot2.old net start bits net start wuauserv sfc /scannow?
Check whether the original trigger still reproduces the same failure. For this page, a useful checkpoint is whether windows update repeatedly fails with 0x80070002 becomes less frequent, changes form, or points you toward a more specific next step.
When should I not rely on net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 catroot2.old net start bits net start wuauserv sfc /scannow alone?
This is not the right first fix for a single third-party app bug, a browser-only issue, or obvious hardware failure. Use it when the symptom points to Windows image health, recurring update corruption, or protected system files.