CACHE_S_SOMECACHES_NOTUPDATED (0X00040172) Fix
This error pops up when Windows update or app install leaves cached files behind. It's annoying but fixable without reinstalling Windows.
When You'll See This Error
You'll hit 0X00040172 right after a Windows Update fails midway. Usually during a feature update like the jump from Windows 10 22H2 to Windows 11 23H2, or when a cumulative update (KB5041585, for example) gets stuck at 95% then rolls back. You might also see it after a failed Microsoft Store app update or when installing a big Visual C++ redistributable. The error text — "Some caches are not updated" — is the giveaway.
Root Cause
The culprit here is almost always a corrupted or locked cache file inside C:\Windows\SoftwareDistribution. When Windows Update or an installer starts, it writes temporary data to that folder. If the process crashes, gets killed by a reboot, or hits a permissions snag, some cached files remain in a half-baked state. The next time Windows tries to update, it sees those stale caches and refuses to overwrite them. It's not a hardware problem — it's just Windows being overly cautious with leftover junk.
Fix: Clear the Caches Step by Step
Step 1: Stop the Windows Update Service
Open a Command Prompt as Administrator. Do not skip this — running without admin rights won't let you touch the cache folder.
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
This kills the four services that hold locks on update files. If any service says "stopped" already, that's fine.
Step 2: Rename the Cache Folders
Instead of deleting them (which can trigger permission errors), rename them. If something goes wrong, you can always delete the renamed folder later.
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
Don't bother with deleting catroot2 directly — renaming is safer and faster.
Step 3: Restart the Services
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
You'll see a message like "The service started successfully" for each. If wuauserv fails to start, check if Windows Update is disabled in services.msc — it shouldn't be.
Step 4: Run System File Checker and DISM
This error sometimes masks deeper system corruption. Run these in the same admin Command Prompt:
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
Let them complete. SFC will say "Windows Resource Protection found corrupt files and successfully repaired them" or "did not find any integrity violations." Either is fine. DISM can take 15 minutes — don't interrupt it.
Step 5: Reboot and Try the Update Again
Restart your machine. Now go back to Settings > Windows Update and click Check for Updates. The error should be gone. If the update still fails, try the same steps but skip step 4 unless you saw corruption in SFC.
What to Check If It Still Fails
If clearing caches doesn't work, look at these two things:
- Disk space: Open File Explorer and check if your C: drive has less than 10GB free. Low space can cause this exact error because the cache can't be recreated. Delete temp files with Disk Cleanup (right-click C: > Properties > Disk Cleanup).
- Third-party antivirus: Disable any AV software like McAfee, Norton, or even Malwarebytes temporarily. These tools sometimes lock update cache folders. If the update works after disabling, whitelist
C:\Windows\SoftwareDistributionin your AV settings. - System time: Check that your date and time are correct. An off-by-hour clock can confuse Windows Update's cache validation. Enable "Set time automatically" in Settings.
If none of that helps, you're looking at a deeper issue — maybe a corrupt user profile or a failed SSD. But in my 14 years, I've only seen that once. Nine times out of ten, renaming those two folders is the fix.
Was this solution helpful?