Reset the Windows Update Cache and Components – Complete CMD Guide
When Windows Update stops searching, downloads hang or updates repeatedly fail, resetting the Windows Update components can help. This CMD guide covers the safe standard method and the deeper troubleshooting steps.
When should you reset Windows Update?
Typical symptoms include downloads stuck indefinitely, a Windows Update service that runs but does not process updates, recurring update errors or a damaged local update datastore. A reset is a repair measure, not the first response to every update problem.
Preparation: open an elevated CMD
Save open work and open Command Prompt with Run as administrator. On managed systems, also consider WSUS, Intune, Group Policy and other management layers. A local cache reset cannot fix a central policy or network problem.
The three important services
The classic reset stops Windows Update (`wuauserv`), BITS (`bits`) and Cryptographic Services (`cryptsvc`). Microsoft also uses these services in current Windows Update reset procedures.
Rename rather than immediately delete
Renaming `SoftwareDistribution` and `catroot2` is the safer administrator approach. Windows creates fresh directories on the next run, while the old data remains available as a rollback point.
Complete CMD block
Run the following commands one by one in an elevated Command Prompt. Wait for each command to finish before continuing.
net stop wuauserv
net stop bits
net stop cryptsvc
ren %windir%\SoftwareDistribution SoftwareDistribution.old
ren %windir%\System32\catroot2 catroot2.old
net start cryptsvc
net start bits
net start wuauserv
What is SoftwareDistribution?
`C:\Windows\SoftwareDistribution` contains local Windows Update data. A damaged datastore can prevent the update agent from progressing. Renaming it makes Windows create a fresh directory.
What is catroot2?
`catroot2` belongs to Windows cryptographic/catalog processing and is included in comprehensive Windows Update component resets.
If .old folders already exist
If `SoftwareDistribution.old` or `catroot2.old` already exist, `ren` will fail. Do not immediately delete them. First determine whether a previous reset already created them.
Aggressive option: actually delete the cache
If renaming does not help and the old data is no longer needed, the backup folders can be removed after a successful reset. Microsoft also documents deeper component-reset steps. Avoid `sc.exe sdset` changes unless needed because they modify service security descriptors.
BITS download queue
BITS manages background downloads. On persistent problems, the BITS queue and related `qmgr*.dat` files can become relevant. This is an advanced troubleshooting step rather than the normal cache reset.
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
After the reset
Restart Windows and run Windows Update again. The first check may take longer because the local update datastore is rebuilt.
If Windows Update still fails
Do not keep deleting more files blindly. Check network, proxy, DNS, Group Policy, WSUS/Intune, system time and service state. `DISM /Online /Cleanup-Image /RestoreHealth` and `sfc /scannow` are common next steps for damaged system components.
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
Practical support script
For recurring support cases, save the standard reset as a `.cmd` file. The script below deliberately uses renaming so the previous data is not immediately destroyed.
@echo off
echo ============================================
echo Reset Windows Update components
echo ============================================
echo.
echo Run this script as Administrator.
echo.
net stop wuauserv
net stop bits
net stop cryptsvc
echo.
echo Renaming Windows Update data directories...
if exist "%windir%\SoftwareDistribution.old" (
echo SoftwareDistribution.old already exists.
echo Check the existing backup folder first.
goto :END
)
if exist "%windir%\System32\catroot2.old" (
echo catroot2.old already exists.
echo Check the existing backup folder first.
goto :END
)
ren "%windir%\SoftwareDistribution" SoftwareDistribution.old
ren "%windir%\System32\catroot2" catroot2.old
echo.
echo Starting services again...
net start cryptsvc
net start bits
net start wuauserv
echo.
echo ============================================
echo Reset completed.
echo Restart Windows and check Windows Update.
echo ============================================
:END
pause
Important on servers
On production Windows Server and managed corporate devices, schedule an update reset carefully. With WSUS, MECM, Intune or Group Policy, a local cache problem may only be a symptom of a central configuration.