Windows command guide
How to Clear the Windows Update Download Cache
Windows Update stores downloaded packages before installation. If those cached files become damaged, Windows can keep retrying the same payload, freeze at the same percentage, or fail before installation really begins. Clearing the download cache forces Windows to fetch fresh copies.
This guide is written around the specific symptom-command match for clear windows update download cache, 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.
PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv"
Best place to run it
Elevated PowerShell 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 downloads the same package again and again
- Run the primary repair line exactly as shown: PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv".
- 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.
$ErrorActionPreference = "Continue"
Write-Host "Run this PowerShell block in an elevated window before trusting the result."
Write-Host "Starting targeted Windows repair step..."
PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv"
Write-Host "`nReview the output above before moving to the next fix."
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.
DISM /Online /Cleanup-Image /CheckHealth
sfc /verifyonly
What problem this command is trying to solve
This script targets broken or stale download files inside the Windows Update cache.
- Windows Update downloads the same package again and again.
- Update progress freezes and never recovers.
- You suspect the cached update files are damaged.
How the command works
The script stops Windows Update services, removes cached files from SoftwareDistribution\Download, and starts the services again so fresh files can be downloaded.
When it makes sense to run it
Use it when update downloads are obviously stuck or corrupted. It is more focused than a full Windows Update reset.
Before you run this command
- Open an elevated Command Prompt or PowerShell window before running PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv".
- Confirm that the symptom really matches this guide, especially if you are seeing signs such as: windows update downloads the same package again and again.
- 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 PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv", compare the result against the symptom that brought you here. The most useful checkpoint is whether windows update downloads the same package again and again 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 PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv" is to repeat the action that previously triggered the problem. If update progress freezes and never recovers 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
The next update attempt will download files again, so it can take longer on slow connections. Run it in an elevated PowerShell window.
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 PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv" does not improve windows update downloads the same package again and again, 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 PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv" for this exact Windows symptom?
Use it when the behavior on your PC lines up with the repair target on this page: This script targets broken or stale download files inside the Windows Update cache.
What should I check right after PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv"?
Check whether the original trigger still reproduces the same failure. For this page, a useful checkpoint is whether windows update downloads the same package again and again becomes less frequent, changes form, or points you toward a more specific next step.
When should I not rely on PowerShell -Command "Stop-Service wuauserv,bits -Force; Remove-Item -Path C:WindowsSoftwareDistribution\Download* -Recurse -Force -ErrorAction SilentlyContinue; Start-Service bits,wuauserv" 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.