Delivery Optimization keeps update files long after the update
Windows caches update payloads to share them with other PCs, and the cache outlives the update. Where it is and how to clear it properly.
Delivery Optimization is the part of Windows Update that downloads pieces of an update from other PCs rather than only from Microsoft, and then shares yours back. To share, it has to keep a copy, and the copy stays after the update it came from has been installed and forgotten.
Where the cache lives
| Path | What is in it |
|---|---|
C:\Windows\SoftwareDistribution\DeliveryOptimization | Cached update payloads, kept for sharing |
C:\Windows\SoftwareDistribution\Download | The update files currently being applied |
C:\Windows\SoftwareDistribution\DataStore | The update history database |
Reading it before clearing it
# What the cache is holding, and what it has shared
Get-DeliveryOptimizationStatus | Format-Table FileId, FileSize, BytesFromPeers, Status
Get-DeliveryOptimizationPerfSnap
# The folder itself
$p = 'C:\Windows\SoftwareDistribution\DeliveryOptimization'
'{0:N0} MB' -f ((Get-ChildItem $p -Recurse -Force -File -EA SilentlyContinue |
Measure-Object Length -Sum).Sum / 1MB)Clearing it, in order of preference
- The supported cmdlet, from an elevated prompt:
Delete-DeliveryOptimizationCache -Force. It empties the cache without touching anything the update service is mid way through. - Disk Cleanup, which lists it as Delivery Optimization Files. Slower, but it shows you the size before you commit.
- Storage Sense, which clears it on a schedule alongside the rest, covered in Disk Cleanup against Storage Sense.
Deleting the folder by hand is the option everyone reaches for and the only one that can leave the update service confused. The cmdlet exists precisely so you do not have to.
Capping it rather than clearing it
Settings, Windows Update, Advanced options, Delivery Optimization has an Absolute Max Cache Size in gigabytes, and a percentage cap as an alternative. Setting a real ceiling once is better than clearing the cache every few months, because the cache refills after every update either way.
The same advice applies to the rest of the update machinery, which is covered in the Windows Update cache. Both are caches that are correct to exist and wrong to leave uncapped on a small drive.
Common questions
What are Delivery Optimization files?
Cached copies of Windows Update payloads that your PC keeps so it can share them with other machines on your network or the internet. They remain after the update is installed.
Is it safe to delete Delivery Optimization files?
Yes. They are a cache, and clearing them does not affect installed updates. Use Delete-DeliveryOptimizationCache -Force from an elevated prompt, or the Delivery Optimization Files entry in Disk Cleanup.
Where are Delivery Optimization files stored?
In C:\Windows\SoftwareDistribution\DeliveryOptimization. On a fully updated machine the whole SoftwareDistribution folder measured 56 MB, but it is much larger immediately after a feature update.
How do I stop Delivery Optimization using so much space?
Set an Absolute Max Cache Size in Settings, Windows Update, Advanced options, Delivery Optimization. Capping it once is better than clearing it repeatedly, since it refills after every update.