Skip to content

The thumbnail cache, and the icon cache people confuse with it

Two caches, two different fixes, and both get blamed for the other's symptoms. Where they live and how to rebuild each one safely.

5 min read

Two different caches sit in the same folder and get treated as one. The thumbnail cache holds the previews Explorer shows for pictures and video. The icon cache holds the small images for file types and applications. Blank thumbnails and wrong icons are different faults with different fixes.

What is in the folder

File patternHoldsRebuilt by
thumbcache_*.dbPreviews at each size, from 16 px to 2560 pxBrowsing the folders again
iconcache_*.dbFile type and application iconsRestarting Explorer
$p = "$env:LOCALAPPDATA\Microsoft\Windows\Explorer"
Get-ChildItem $p -Force |
  Select-Object Name, @{n='MB';e={[math]::Round($_.Length/1MB,1)}} |
  Sort-Object MB -Descending

Clearing the thumbnail cache

The safe route is Disk Cleanup, which lists Thumbnails as its own line with a size next to it. It handles the file locks for you, which is the part that makes the manual method awkward.

# The manual equivalent. Explorer holds the files open, so it is closed first.
Stop-Process -Name explorer -Force
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\thumbcache_*.db" -Force -EA SilentlyContinue
Start-Process explorer

Clearing the icon cache, which is a different file

Stop-Process -Name explorer -Force
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\iconcache_*.db" -Force -EA SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\IconCache.db" -Force -EA SilentlyContinue
Start-Process explorer

The second path is the older location and still exists on many machines, which is why an icon fix that only clears one of the two sometimes appears not to work.

Whether this is worth doing for space

Rarely. It is worth doing to fix blank previews or stale icons, and the space is a side effect. If a picture library is the reason the drive is full, the files themselves are the target, and photo editors and their catalogues usually hold more than the originals do.

Both caches rebuild as you browse, so there is no lasting cost. That is also the reason not to bother on a schedule: you are deleting something that is about to be written again, the same trade described in a sensible monthly routine.

Common questions

Where is the thumbnail cache in Windows?

In %LOCALAPPDATA%\Microsoft\Windows\Explorer, as files named thumbcache_*.db. The icon cache sits beside it as iconcache_*.db, plus an older IconCache.db one level up.

Is it safe to delete thumbcache.db files?

Yes. They are rebuilt as you browse folders again. Explorer keeps them open, so either use Disk Cleanup's Thumbnails entry or stop Explorer first.

How large can the thumbnail cache get?

On a machine with no picture library it measured 5 MB. On a machine with a large photo collection it commonly reaches several hundred megabytes, because previews are stored at several sizes per image.

Why are my icons wrong after clearing thumbnails?

Because icons are a separate cache. Remove iconcache_*.db and %LOCALAPPDATA%\IconCache.db, then restart Explorer.

Read next