While updating, Windows downloads a ton of temporary files that help to download and install OS updates conveniently. These temporary files or update cache are stored within the SystemDistribution folder.
With time these cache files may pile up to use a lot of space within your disk. Moreover, large cache files may get corrupted, resulting in laggy performance, crashing desktop, etc.
But Windows doesn’t have the feature of auto-deleting such Update cache files. So, this article shall help you to manually clear Windows Update Cache.
Clear Windows Update Cache
Clearing the Windows update cache includes stopping the Windows Update service and then deleting the cache files. The steps for doing each have been detailed below:
Step 1: Stop Services
The Windows update service constantly uses the files within the Windows Update Cache folders. So, if you head to delete them directly, you will receive ‘file in use’ prompt and won’t be able to delete them. Therefore, you will have to stop the update service first by following the steps below:
- Press Windows + R to open Run.
- To open the Services utility, type
services.mscand Hit Enter.
- Locate Windows Update.
- Right-click on it and Select Stop to stop the service.
Step 2: Delete Cache Files
Now, you can move toward the SoftwareDistribution folder, which holds all the temporary files used to download and install Windows Update.
- Press Windows + E to open File Explorer.
- Copy and paste
C:\Windows\SoftwareDistributionin the address bar.
- Press Ctrl + A to select all contents and press Shift + Del keys to permanently delete them.
- Click Yes on the permanent deletion confirmation prompt.
- Hit Continue if admin permission is asked.
After deleting the folders, you can restart the stopped services by following the same steps; just pick Start instead of Stop on the 4th step.
How to Reset Windows Update?
Sometimes Windows updates may fail due to incorrectly downloaded update files. In such a case, you can reset the update components and start the updating process all over again.
To reset the Windows Update component, you will have to go through the same steps but have to stop more services and delete more folders. If your update process fails or shows trouble, you can follow the steps to delete all the Windows update components by running commands:
- Open Run with Windows + R.
- Type cmd, and press Ctrl + Shift + Enter to open Command Prompt.
- Click Yes to give it admin rights.
- Run the following command first to stop the services:
net stop wuauserv-To stop Windows Update
net stop cryptsvc-To stop Cryptographic Service
net stop bits-To stop Background Intelligent Transfer Service
net stop appidsvc-To stop Application Identity
- Execute the following to delete the cache folder:
rmdir %systemroot%\SoftwareDistribution /S /Q-to delete SoftwareDistribution folder.
rmdir %systemroot%\system32\catroot2 /S /Q-to delete catroot2 folder.
- Now, to restart those services and register bits/windows update files, run the following:
net start wuauserv net start cryptsvc net bits net appidsvc Del “%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat” cd /d %windir%\system32 regsvr32.exe atl.dll regsvr32.exe urlmon.dll regsvr32.exe mshtml.dll regsvr32.exe shdocvw.dll regsvr32.exe browseui.dll regsvr32.exe jscript.dll regsvr32.exe vbscript.dll regsvr32.exe scrrun.dll regsvr32.exe msxml.dll regsvr32.exe msxml3.dll regsvr32.exe msxml6.dll regsvr32.exe actxprxy.dll regsvr32.exe softpub.dll regsvr32.exe wintrust.dll regsvr32.exe dssenh.dll regsvr32.exe rsaenh.dll regsvr32.exe gpkcsp.dll regsvr32.exe sccbase.dll regsvr32.exe slbcsp.dll regsvr32.exe cryptdlg.dll regsvr32.exe oleaut32.dll regsvr32.exe ole32.dll regsvr32.exe shell32.dll regsvr32.exe initpki.dll regsvr32.exe wuapi.dll regsvr32.exe wuaueng.dll regsvr32.exe wuaueng1.dll regsvr32.exe wucltui.dll regsvr32.exe wups.dll regsvr32.exe wups2.dll regsvr32.exe wuweb.dll regsvr32.exe qmgr.dll regsvr32.exe qmgrprxy.dll regsvr32.exe wucltux.dll regsvr32.exe muweb.dll regsvr32.exe wuwebv.dll
Now, you can restart the Update process from the beginning and expect it to go smoothly.
Alternatively, you can rename the folders in order to make them inaccessible to Windows and will save the already downloaded files for further use cases. Doing so will also make sure the update components get redownloaded when required.
The process will be same as above, you will just have to replace the 5th step commands with the command mentioned below to rename folders
ren %systemroot%\SoftwareDistribution SoftwareDistributionOld
ren %systemroot%\system32\catroot2 catroot2old