Download Article
Get rid of corrupt cache files to fix update installation errors
Download Article
Are you having trouble installing Windows Updates? If a Windows update fails mid-way or gets stuck installing, clearing the update cache forces Windows to redownload the installation files from Microsoft, which tends to fix the problem. Read on for simple steps to clear the Windows Update cache using Windows 10 or 11.
Quick Steps
- Open Command Prompt as an administrator.
- Type "net stop wuauserv" and press Enter .
- Type "net stop bits" and press Enter .
- Type "rmdir /S /Q C:\Windows\SoftwareDistribution" and press Enter .
- Type "net start wuauserv" and press Enter .
- Type "net start bits" and press Enter .
Steps
Section 2 of 6:
Using Command Prompt
-
Open Command Prompt as an administrator. An easy way to clear the Windows Update cache is from the command prompt. Don't worry—this is simple, even if you're uncomfortable typing commands. To open Command Prompt as an admin :
- Press the Windows key and type cmd .
- Right-click Command prompt and select Run as administrator .
- Click Yes to confirm.
-
Stop all Windows Update services. If the services are running, you won't be able to delete the entire update cache. At the prompt, type the following commands:
- Type net stop wuauserv and press Enter .
- Type net stop bits and press Enter .
-
Clear the Windows Update cache. This command deletes everything in the C:\Windows\SoftwareDistribution folder, which is where cached update files are stored:
- Type rmdir /S /Q C:\Windows\SoftwareDistribution and press Enter .
-
Restart the update services. Now that the update cache is clear, you can restart the services you stopped earlier.
- Type net start wuauserv and press Enter .
- Type net start bits and press Enter .
Advertisement
Section 3 of 6:
Using File Explorer
-
Open the Windows Services list. Another way to clear the Windows Update cache is using File Explorer. Before you do this, though, you'll want to stop the Windows Update services so the files can actually be removed. To open Windows Services:
- Press the Windows key or click the Windows menu.
- Type services.msc and press Enter .
-
Stop the Windows Update service. To do this, scroll down to "Windows Update," right-click it, and select Stop .
- Leave the window open for now. After clearing the update cache, you'll need to reenable these services.
-
Stop the Background Tasks Infrastructure Service. Scroll back up, right-click "Background Tasks Infrastructure Service," and select Stop . This will ensure that nothing prompts Windows Update to restart until you do it manually.
-
Open File Explorer and open the Windows folder. The Windows folder is located at C:\Windows on most PCs.
- For example, if Windows is installed on your C drive, click This PC in the left panel, click the C drive, then double-click the Windows folder.
-
Delete the SoftwareDistribution folder. To fully clear the update cache, you'll want to delete everything in this folder. Scroll down, select SoftwareDistribution , press the delete key on your keyboard, and click Continue to confirm.
-
Restart the Windows Update services. Now that the cache is empty, return to the Windows Services window and restart the services you stopped.
- Right-click Background Tasks Infrastructure Service and select Start .
- Right-click Windows Update and select Start .
Advertisement
Section 4 of 6:
Using a Batch Script
-
Open a text editor like Notepad. If you want to clear the update cache quickly in the future, you can use this method to write a quick batch script that clears the update cache for you. You will need to run this script as an administrator for it to work.
-
Paste the following into the file. This script stops the Windows Update service, stops the Background Intelligent Transfer Service, clears the cache, and then restarts the services.
@ Echo On net stop wuauserv net stop bits C : rmdir /S /Q %Windir% \SoftwareDistribution net start wuauserv net start bits pause
-
Save the file as a BAT file. If you're using Notepad, click the File menu, select Save as , and choose a folder to save the file in. Then, select "All files" from the "Save as type" menu, name the file something like "clear_update_cache.bat", and click Save .
-
Run the script to clear the cache. To use your script to clear the cache, right-click the file, select Run as administrator , and then click Yes to confirm. A Command Prompt window will open and run the commands from the script.
- When the script is finished running, the Windows Update cache will be cleared, and you'll see "Press any key to continue . . ." at the bottom. When you press a key, the window will close.
Advertisement
Section 5 of 6:
Using Windows Settings
-
Open your Windows Settings . Press the Windows key on your keyboard (or click the Windows menu) and select Settings .
- This method can be helpful to free up some disk space , but it usually won't fix any Windows Update errors. The files you'll be deleting are update files from previous updates, and they're meant to help you in case you need to revert to the last version.
-
Select System . If you're using Windows 11, it'll be in the left panel. On Windows 10, click the System icon.
-
Click Storage . It's in the center panel on Windows 11, and at the bottom of the left panel on Windows 10. Windows will quickly scan to determine the amount of space used on your PC.
-
Click Temporary files . This displays a list of different types of temporary files stored by Windows, including how much space each file type is consuming. [1] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
-
Select "Windows Update Cleanup". If you don't see this option, there aren't any Windows Update files to delete. They're deleted automatically after a while.
- You can, however, check "Delivery Optimization Files," which does contain some cached files relating to Windows Update. However, these cached files are intended to improve update speeds for other computers on your network. [2] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
- If you're low on space, we recommend selecting other types of temporary files to delete as well. Just be careful not to select "Downloads" if you don't want to delete everything in your Downloads folder.
-
Click the Remove files button and confirm. This clears the Windows Update cache and frees space from other selected temporary files.
Advertisement
Section 6 of 6:
Using Disk Cleanup
-
Open Windows Disk Cleanup. To do this, press the Windows key on your keyboard, type disk cleanup , and click Disk Cleanup from the search results. [3] X Trustworthy Source Microsoft Support Technical support and product information from Microsoft. Go to source
- Like the Settings method, using Disk Cleanup to clear the Windows Update cache won't fix problems with Windows Update. The files you'll be deleting will free up space from existing update files that are no longer needed, but because these files are just backed-up files from your previous update, this is not the equivalent of clearing the cache, despite what some believe.
-
Click Clean up system files . This quickly scans files that can be deleted and displays them in a list.
-
Check the box next to "Windows Update Cleanup". If you don't see this option, there aren't any Windows Update files to delete. They're usually deleted automatically after a while.
- You can, however, check "Delivery Optimization Files," which does contain some cached files relating to Windows Update. However, these cached files are intended to improve update speeds for other computers on your network.
- If you're running low on space, select any other types of files you want to delete. You can even select "Recycle Bin" to permanently delete your deleted files.
-
Click OK and then Delete Files to confirm. This deletes the selected Windows Update files (and any other files you selected).
Advertisement
Expert Q&A
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
References
- ↑ https://support.microsoft.com/en-us/windows/free-up-space-for-windows-updates-429b12ba-f514-be0b-4924-ca6d16fa1d65
- ↑ https://support.microsoft.com/en-us/windows/clear-the-delivery-optimization-cache-c0e93802-5800-5554-7380-594014a6089b
- ↑ https://support.microsoft.com/en-us/windows/free-up-drive-space-in-windows-85529ccb-c365-490d-b548-831022bc9b32
About This Article
Thanks to all authors for creating a page that has been read 459 times.
Advertisement