Download Article
Get rid of corrupt cache files to fix update installation errors
Download Article
- Why clear the cache?
- Using Command Prompt
- Using File Explorer
- Using a Batch Script
- Using Windows Settings
- Using Disk Cleanup
|
|
|
|
|
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.
-
When Windows installs updates, it first downloads the installation files and saves them to a folder. Once the files are downloaded, Windows uses them to install the updates. If Windows Update fails, gives you an error, or gets stuck, there could be a problem with files in that cache. To fix the failed update, you can easily clear the update cache—it’s safe and will not harm your computer.
- You can also clear the update cache to free up space on your computer. However, Windows does clear the update cache automatically—the files are only saved for a certain period after an update is installed successfully, just in case you need to revert to a previous update.
Advertisement
-
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.
-
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.
-
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.
-
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
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
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.
-
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
-
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.
-
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
-
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.
-
If you’re using Windows 11, it’ll be in the left panel. On Windows 10, click the System icon.
-
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.
-
This displays a list of different types of temporary files stored by Windows, including how much space each file type is consuming.[1]
-
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]
- 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.
- 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]
-
This clears the Windows Update cache and frees space from other selected temporary files.
Advertisement
-
To do this, press the Windows key on your keyboard, type disk cleanup, and click Disk Cleanup from the search results.[3]
- 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.
-
This quickly scans files that can be deleted and displays them in a list.
-
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.
-
This deletes the selected Windows Update files (and any other files you selected).
Advertisement
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Thanks for submitting a tip for review!
References
About This Article
Thanks to all authors for creating a page that has been read 8,022 times.
Is this article up to date?
Table of contents
- Is It Safe to Delete Windows Update Files?
- What Is Windows Update Cleanup?
- Why Should You Delete Windows Update Files?
- How to Run Windows Update Cleanup on Your PC
- Method 1: Use third-party software
- Method 2: Use Storage Sense for cleaning up Windows Update files
- Method 3: Use the Disk Cleanup utility
- Method 4: Use the Command Prompt for Windows Update cleanup
- Potential Windows Update Cleanup Issues and Ways to Fix Them
- Issue 1: Windows Update Cleanup is not deleting files
- Issue 2: Windows Update Cleanup gets stuck or takes an unusually long time
- Issue 3: Windows Update gets stuck on “cleaning up”
- Issue 4: Error messages during Windows Update Cleanup
- Issue 5: You are missing the Windows Update Cleanup option
- Windows Update Cleanup: Explained
- FAQ
Even though Windows Update can be annoying sometimes (scratch that, most times), it’s still important because of the security updates and new features they offer. However, this process leaves lots of files you might not need, and that’s where W indows Update Cleanu p comes in.
Is It Safe to Delete Windows Update Files?
Now, is it okay to delete Windows Update files? Short answer: Yes, you can remove them without any issues.
The only problem is that it’ll also remove previous versions of Windows . That said, most users don’t see a problem with clearing these files.
But if it is for you, you can always back up your Windows .
With that out of the way, let’s go through how to delete Windows Update data.
Let’s begin.
What Is Windows Update Cleanup?
Windows Update Cleanup is a Windows built-in feature that removes old files from Windows Update that you might not need.
I use “might” here because, sometimes, some users like to revert Windows Updates if a new update causes issues for them. Every time your PC installs an update, it stores log files, temporary files , and other stuff.
Also read:Windows Update Troubleshooter: Easily Fixing Windows Update Issues
If you’ve been using your computer for a long time, these update files can pile up, taking significant spaces on your system. Microsoft saw this and came up with this tool to scan and remove these unnecessary files. It’s a simple and effective way to keep your computer running smoothly and optimize storage capacity.
Why Should You Delete Windows Update Files?
Cleaning up Windows updates is important for several reasons:
- You get to free up disk space. Windows updates can accumulate a significant amount of temporary files, log files, and other data over time. Cleaning up these files helps you to get more disk space on your PC .
- Your system performance improves. A cluttered system with unnecessary update files can impact the performance of your computer. If you remove these files, you can speed up your system .
- Fix any issues related to Windows updates. In some cases, you may be facing problems with your system updates because of conflicting or corrupt files. The W indows Update cleaning u p process can correct the issue.
- Improve your system security. One of the reasons why we tolerate Windows updates is the security upgrades they offer. If you leave your computer as it is, old and unnecessary update files may pose security risks.
Let’s find out h ow to delete old Windows Upda te files for good!
How to Run Windows Update Cleanup on Your PC
Follow the several methods below to clean up your update files. We’ve arranged them from the simplest to the more challenging to make them easier for you!
Method 1: Use third-party software
If you don’t want to get into the nitty gritty of removing update files from your PC manually, you can use specialized software that will do it automatically, such as Auslogics BoostSpeed . Compared to other solutions mentioned in this guide, this method is the best way to clean up your computer without any issues. Here’s how to delete Windows Update files using Auslogics BoostSpeed:
- Download and install Auslogics BoostSpeed from the official website.
- Double-click on the desktop icon or access it from the Start menu to launch the program.
- Search for All Tools on the bar and click on it.
- After that, scroll down and click on Deep Disk Cleaner .
- You can click Scan Now to scan your system or check only Windows Update Files . Whatever your choice is, BoostSpeed will thoroughly search and bring up old update files for you to delete.
- After the scan, select Clean up to delete Windows Update files.
PRO TIP
Whether you’re a general user or a tech-savvy, you can easily use Auslogics BoostSpeed to run a complete system checkup to remove junk files, fix speed-reducing issues, and resolve any system or app crashes or glitches!
Method 2: Use Storage Sense for cleaning up Windows Update files
Another option at your disposal is Storage Sense. Check out the method below on how to use it:
Currently, Storage Sense doesn’t directly delete Windows Update files. It’s designed to focus on temporary files and items in your Recycle Bin. That said, it doesn’t mean it can’t remove them. You can try it if it works for you; if it doesn’t, try the previous method or move to the next solution.
Windows 10
- Open the Start menu and go to Settings .
- In the Settings window, click on System and then select Storage from the left sidebar.
- Enable the Storage Sense toggle switch if it’s not already turned on.
- Click on Configure Storage Sense or run it now .
- Under the Temporary Files section, check the Delete temporary files that my apps aren’t using .
- Scroll down and click on Clean now to start the cleanup process.
Windows 11
- Launch the Settings menu.
- Go to System and click on Storage .
- Scroll down and toggle the Storage Sense switch.
- After that, click on the Storage Sense bar.
- When the new window opens, click Run Storage Sense now.
Method 3: Use the Disk Cleanup utility
Here’s h ow to delete Windows Update file s using the Disk Cleanup tool. However, keep in mind that even though it’s safe to use this utility to delete the update files, removing certain files can affect system stability. So, proceed with caution.
- Open the Start menu and search for “Disk Cleanup.” Click on the Disk Cleanup app from the search results.
- Select the drive where your operating system is installed (usually the C: drive) and click OK.
- In the Disk Cleanup window, click on the Clean up system files button.
- Select the drive again and click OK .
- Check the Windows Update Cleanup option from the list of files to delete.
Click OK to start the cleanup process. Be patient, as it may take some time to complete.
Even though Disk Cleanup gets the job done, a computer cleaner can be more effective. Aside from deleting Windows Update files, it can also optimize your PC for better performance.
Check out our in-depth guide on the best free PC cleaners to find the perfect fit for your needs!
Method 4: Use the Command Prompt for Windows Update cleanup
You can use the Command Prompt to de lete old Windows Update file s. However, if you’re not well-versed in how this tool works, it may cause more problems than solutions. We’ve provided screenshots to assist you. However, if it’s too much to handle, we recommend going with the easiest method discussed above.
- Open the Start menu and search for “Command Prompt.” In the right-side menu, select Run as administrator .
- When the window opens, type the following command and press Enter:
cleanmgr /sageset:1
- A Disk Cleanup window will appear. Select the Windows Update Cleanup option and click OK .
- Return to the Command Prompt window and type the following command:
cleanmgr /sagerun:1
- Press Enter to start the cleanup process.
Also read:Change Directory in CMD (Command Prompt)
You can use the Command Prompt to delete the Software Distribution folder, which keeps all your Windows Update files.
However, this can be tricky if you’re not a bit techie. Luckily, you can check out our dedicated guide on how to delete the Software Distribution folder .
Potential Windows Update Cleanup Issues and Ways to Fix Them
Sometimes, you may be finding it difficult to free up disk space on your C drive . This happens way more often than you think. Check the issues below and ways to resolve them:
Issue 1: Windows Update Cleanup is not deleting files
If you’re experiencing issues where Windows Update Cleanup is not deleting files as expected, follow these troubleshooting steps:
- Check the Disk Cleanup utility. Ensure that you are running the Disk Cleanup utility with administrative privileges.
- Restart your computer. Sometimes, a simple restart can resolve temporary issues that are preventing your files from being deleted.
- Run Disk Cleanup in Safe Mode. Boot your computer into Safe Mode and then run Disk Cleanup.
- Disable Windows Update services. Temporarily disabling Windows Update services can sometimes help resolve issues with Windows Update Cleanup.
- Check for disk errors. Run the Disk Check utility to scan for and fix any errors on your hard drive .
- Use the Command Prompt. If the Disk Cleanup utility is not working, you can try performing Windows Update Cleanup using the Command Prompt.
- Use third-party cleanup tools. If the built-in Windows tools aren’t able to fix the problem, there are always reliable third-party cleanup tools that can do a superb job at optimizing and cleaning up Windows Update.
Issue 2: Windows Update Cleanup gets stuck or takes an unusually long time
If Windows Update Cleanup is taking too much time or seems to be stuck, try the below steps:
- Wait for the Windows Update cleanup to complete. Sometimes, the utility can take a lot of time, especially if it has to process a large number of files. So, before doing anything, be patient and let the process complete.
- Restart your computer. After the restart, run the cleanup process again to see if it completes successfully.
- Check for drive issues. You can also check for disk errors because they can cause delays and interruptions in the cleanup process.
- Boot your system in Safe Mode. Boot your computer into Safe Mode and then run Windows Update Cleanup to see if that works.
- Temporarily turn off your antivirus software. Antivirus or security software can sometimes interfere with the cleanup process. You can switch off the antivirus until the cleanup is done. You can turn it back on after that.
PRO TIP
Consider switching to an antivirus program that has been designed for Windows and won’t interfere with any Windows processes, like Auslogics Anti-Malware. This program detects and removes every stubborn malicious item lurking in your PC!
Issue 3: Windows Update gets stuck on “cleaning up”
If Windows Update gets stuck on “cleaning up,” preventing the update from completing, you can try the following:
- Let your PC run a bit longer. Leave your computer running for longer and see if it eventually completes the cleaning up process.
- Restart your PC. You can start your computer again and check if the update continues as expected.
- Run the Windows troubleshooter. Windows includes a built-in troubleshooter specifically designed to resolve Windows Update-related issues. Open the Settings app, go to Update & Security , and select Troubleshoot . Under the Get up and running section, click on Windows Update and follow the on-screen instructions to run the troubleshooter.
- Delete your Windows Update cache. Removing the cache Windows Update has accumulated can fix numerous problems related to updates, especially when updates get stuck.
- Perform a system restore. If the above steps don’t work, you can try performing a system restore to a point before the update was initiated. This will revert your system back to a previous state when Windows hadn’t run it yet.
Related read:[FIXED] System Restore Not Working in Windows 10
Remember to always back up your important data before attempting any troubleshooting steps to avoid potential data loss or system instability.
Related:How to Save Disk Space in Windows 10
Issue 4: Error messages during Windows Update Cleanup
If you encounter error messages during the Windows Update cleaning up process, follow these troubleshooting steps:
- Restart your system and attempt the Windows Update cleanup process again.
- Troubleshoot the issue. Windows has a built-in troubleshooter specifically designed to identify and fix issues with Windows Update. Open the Windows Settings, go to Update & Security , and select Troubleshoot . Then, follow the on-screen prompts to correct any issues.
- Complete any updates waiting. Make sure that there are no pending updates on your computer.
- Run a System File Checker (SFC) scan. The tool will scan your system for any issue or corruption in Windows system files .
- Reset Windows Update components. This option will stop the Windows Update services, rename the Software Distribution, and Catroot2 folders (which store temp update files). After that, it’ll restart the services.
Issue 5: You are missing the Windows Update Cleanup option
If you find that the Windows Update Cleanup option is missing on your PC, here are a few steps you can try:
- Run the SFC scan to verify if any system files are corrupt.
- Make sure your Windows operating system is fully up to date.
- Perform a clean boot . This will allow you to start your system with a minimal set of drivers and startup programs, reducing any software conflicts.
If none of the above steps work, contact Microsoft support or a computer technician for assistance.
PRO TIP
We’ve covered all the points to delete your Windows Update files. If you want the simplest and fastest way to perform this operation, download Auslogics BoostSpeed now!
Windows Update Cleanup: Explained
Deleting your Windows Update files should be a smooth process. However, if it doesn’t go as you planned it, check the issues we’ve listed and implement the solutions we’ve suggested.
We’re pretty sure you’ll complete the process within minutes, if not seconds. If you have any questions, suggestions, or anything helpful, let us know in the comments!
FAQ
No. Once you delete your Windows Update files, they’re gone forever. You can’t recover them through any conventional means. If you ever need those files again, you have to download and reinstall the particular updates from the Microsoft Update Catalog .
Another option is to perform a system restore to the point before the cleanup was done.
The time it takes to delete old Windows Update files isn’t fixed. Factors like the speed of your computer and the size of your update files make it impossible to get an accurate time frame. However, averagely, the process can take anywhere from a few minutes to more than an hour.
It’s safe, but it comes with some trade-offs. When you clear the Windows Update history, you’re only deleting the record of the updates installed. However, the updates themselves are still on your PC. You should only take this action if it’s causing a problem or showing errors.