Clear Your Windows Update Cache
Windows updates have gained a reputation for being a bit temperamental at times, whether you are using Windows 10 or Windows 11. Although Microsoft made a lot of improvements to the Windows update processes, there can sometimes be issues with the Windows update service.
Windows update keeps a cache of files. This cache stores downloaded update files, and sometimes it can become cluttered, leading to various issues like:
- Update stuck or fails: Corrupted data in the cache can prevent updates from downloading or installing correctly.
- Limited disk space: The cache can accumulate and occupy considerable disk space, especially on devices with limited storage.
- Performance slowdown: A bloated cache can put a strain on your system resources, potentially causing sluggishness.
Therefore, knowing how to clear the Windows Update cache is crucial for maintaining optimal system health. Here are two simple methods you can use:
Method 1: Using Disk Cleanup (Recommended for Beginners)
- Open the Start menu and search for “
Disk Cleanup
“. - Select the drive where Windows is installed (usually C:) and click “
OK
.” - Click “Clean up system files” to access more options.
- Check the boxes for “
Windows Update cleanup
” and “Temporary Windows installation files.” - Click “
OK
” and wait for the cleanup to complete. This may take a few minutes.
Method 2: PowerShell Script (Convenient for Frequent Cleaning)
- Create a new PowerShell script (e.g.,
CleanUpdateCache.ps1
):
Stop-Service wuauserv -ErrorAction SilentlyContinue
Stop-Service bits -ErrorAction SilentlyContinue
Stop-Service cryptsvc -ErrorAction SilentlyContinue
Stop-Service msiserver -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Windows\SoftwareDistribution\Download" -Force -Recurse -ErrorAction SilentlyContinue
Start-Service wuauserv -ErrorAction SilentlyContinue
Start-Service bits -ErrorAction SilentlyContinue
Start-Service cryptsvc -ErrorAction SilentlyContinue
Start-Service msiserver -ErrorAction SilentlyContinue
Write-Host "Windows Update cache successfully cleared!"
- Save the script and run it with administrator privileges:
- Right-click the script file and select “
Run as administrator
.” - Enter your administrator password when prompted.
- Right-click the script file and select “
- The script will automatically stop relevant services, delete cache files, and restart the services.
Method 2: One-Time Command (For Specific Situations)
- Open PowerShell as administrator:
- Press Windows + X and select “Windows PowerShell (Admin).”
- Execute the following command:
Stop-Service wuauserv -ErrorAction SilentlyContinue; Remove-Item -Path "C:\Windows\SoftwareDistribution\Download" -Force -Recurse -ErrorAction SilentlyContinue; Start-Service wuauserv -ErrorAction SilentlyContinue
- Press Enter. The command will perform the same actions as the script.
Important Notes:
- Always back up important data before making system changes.
- Restart your computer after clearing the cache for changes to take effect.
- Use the single command only if you understand PowerShell. Incorrect commands can cause problems.
- Clearing the cache doesn’t affect installed updates or system settings.