Icon cache corruption may happen sometimes, causing wrong icons to show up for certain programs or in certain areas of the Windows shell, or no icons at all. My earlier post Incorrect icon shown for a file type tells you how to refresh the shell icons using Default Programs.
In case the solution posted in that link does not help, you may want to completely clear and rebuild the icon cache database. This post explains how to completely clear the icon cache (and let Windows rebuild it), using a specialized tool, or with a script I wrote, or manually — for all versions of Windows, including Windows 10.
Clear icon cache completely in Windows
How to Clear and Rebuild the Icon Cache in Windows
To render the icons for various shell objects like folders, special folders, and files, Windows caches the icons in database files so that Windows doesn’t have to read the file or folder icon and extract them every time. Occasionally, you’ll see icon-caching bugs in Windows resulting in incorrect, missing or out-of-date icons being shown for programs and desktop shortcuts, and other areas of the shell.
If refreshing the icons using ie4uinit.exe or Default apps doesn’t help, you’ll have to completely clear the icon cache.
Let’s see how to clear the icon cache completely, and let Windows rebuild it as and when it requires.
Clear Icon Cache (ClearIconCache.exe) utility from Leo Davidson will cleanly exit Explorer, delete the shell icon cache (IconCache*.db) and localized thumbnail cache (ThumbCache*.db) and then restart Explorer.
Leo Davidson is a trusted source — he is the one wrote the famous PDF x64 thumbnail & preview fix for Windows few years back. And, he’s the owner of FileTypeDiag and many other useful portable tools.
With Clear Icon Cache, you just double-click the program and it takes care of the details for you. Clear Icon Cache works in Windows Vista, Windows 7, Windows 8 and Windows 10.
To run the utility in noninteractive or silent mode, run
As said earlier, the utility also clears the thumbnail caches on the computer.
The icon cache database files are located in your LocalAppData folder with file names prefixed with
iconcache_ – each icon size has a separate cache (database) file.
The file names look like this:
iconcache_16.db iconcache_32.db iconcache_48.db iconcache_96.db iconcache_256.db iconcache_768.db iconcache_1280.db iconcache_1920.db iconcache_2560.db iconcache_exif.db iconcache_idx.db iconcache_sr.db iconcache_wide.db iconcache_wide_alternate.db
- Close all folder windows that are currently open.
- Launch Task Manager using the Ctrl + Shift + Esc key sequence.
- In the Task Manager Process tab, right-click on the Explorer.exe process and select End Process.
- Click the End process button when asked for confirmation.
- From the File menu of Task Manager, select New Task (Run…)
- Type CMD.EXE, and click OK
- In the Command Prompt window, type the commands one by one and press ENTER after each command:
CD /d %userprofile%\AppData\Local DEL IconCache.db /a
- Additionally, in Windows 8 and Windows 10, icon cache database is also stored in %userprofile%\AppData\Local\Microsoft\Windows\Explorer. To clear them, you must close all running applications, and run these commands in the Command Prompt.
CD %userprofile%\AppData\Local\Microsoft\Windows\Explorer DEL IconCache*.db /a EXIT
- In Task Manager, click File, select New Task (Run…)
- Type EXPLORER.EXE, and click OK.
If you receive Access is Denied error when deleting the IconCache*.db files, then one or more of the open programs is using the icon cache database. Close all programs and try again, or try clearing them from Safe mode.
Editor’s note: Instead of using Task Manager to exit Explorer.exe in Step 3 above, even better way to do this is to terminate the Explorer.exe Shell cleanly using the method described in article Terminate and Restart Explorer.exe Process Cleanly in Windows 7 & Windows Vista. If you’re using Windows 8 or Windows 10, check the article How to Exit Explorer and Restart Explorer in Windows 10.
This first method uses a small script that I wrote to clean up the icon cache completely. Once done, the script restarts Explorer shell for the change to take effect.
To clear the icon caches for Windows Vista, 7, 8 and Windows 10, download the zip file below, unzip and run the script file cleariconcache.vbs.
- Download cleariconcache.zip and extract the contents to a folder.
- Save all your work, and close all programs so that icon cache files are not locked by any program.
- Double-click the script file cleariconcache.vbs
- Click Yes when you’re prompted to restart the shell.
If the Icon Cache database files can’t be deleted, some programs are using it. Close all applications and try running the script again.
Once you close all programs, the program should be able to delete the icon cache files.
After clearing the cache, Explorer shell should start automatically, and rebuilds a fresh set of icon cache.
Hope you were able to fix icon rendering issues on your Windows computer by clearing the icon cache completely.
One small request: If you liked this post, please share this?One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in Windows — delivering support for Microsoft's consumer products. He has been a Microsoft MVP (2003-2012) who contributes to various Windows support forums.