How to Clear and Rebuild the Icon Cache Completely in Windows

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.

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.

hand point iconBefore proceeding, try a simple fix like the ie4uinit.exe refresh method described in the article How to Refresh or Clear the Icon Cache Quickly Using IE4UINIT.exe. In many situations, all that you need to do is simply refresh the icons without the need to clear and rebuild them.

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.

Method 1: Clear & Rebuild icon cache using ClearIconCache.exe freeware tool

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.

clear and rebuild icon cache completely

To run the utility in noninteractive or silent mode, run ClearIconCache.exe /QUIET

As said earlier, the utility also clears the thumbnail caches on the computer.

RELATED: How to Restart Explorer Gracefully Using Shortcut or Command-line

Method 2: Clear & Rebuild the Icon Cache Database Manually

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.

clear and rebuild icon cache completely

The file names look like this:

  1. Close all folder windows that are currently open.
  2. Launch Task Manager using the Ctrl + Shift + Esc key sequence.
  3. In the Task Manager Process tab, right-click on the Explorer.exe process and select End Process.
    Note: It’s even better if you exit explorer gracefully. See instructions for Windows 7 and Windows 10 to know how to gracefully quit the Explorer.exe shell process. Don’t restart a new explorer.exe process yet!
  4. Click the End process button when asked for confirmation.
  5. From the File menu of Task Manager, select New Task (Run…)
  6. Type CMD.EXE, and click OK
  7. 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
  8. 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
  9. 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.

  10. In Task Manager, click File, select New Task (Run…)

    task manager new explorer.exe process

  11. Type EXPLORER.EXE, and click OK.

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.

Method 3: Automatically Clear & Rebuild the Icon Cache Using Script

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.

  1. Download and extract the contents to a folder.
  2. Save all your work, and close all programs so that icon cache files are not locked by any program.
  3. Double-click the script file cleariconcache.vbs
  4. 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!
So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

99 thoughts on “How to Clear and Rebuild the Icon Cache Completely in Windows”

  1. Better method:

    Open notepad, paste this exactly:

    TASKKILL /f /im explorer.exe
    CD /d %userprofile%\AppData\Local
    DEL IconCache.db /a
    START explorer.exe

    Save it as “fix icons.bat”, with file type “All types”.

    Run the batch file any time your icons are screwed up.

    The reason this is better is that it automatically kills explorer.exe, deletes the icon cache for you, and restarts explorer.exe.

  2. I think this has worked! Many thanks indeed, you do a great service to hapless Windows suffers (and who is not?).

  3. Thank you for your info, and help in restoring all my icon, no one else seemed to have a clue, glad someone is professional in their approach. Tahnks again.

  4. Thanks, but I solved it by going into Safe Mode, for which I didn’t need the screen to initiate it and then going into System restore , about 6 days, which sorted me out.

  5. Awesome! Lost Outlook 2010 icon in task bar bizarrely – followed your instructions and ‘boom’, icon appeared. Cheers!

  6. Brilliant! I would add that there is a space in the first line between /d and %userprofile%. Also in the second line between IconCache.db and /a

    Took me two tries. Thanks again!

  7. Thanks so much – worked perfect for me (Windows 7 on a Dell)
    I would also like to know what caused the problem in the first place.
    Kind regards

  8. HOLY CRAP THIS WORKS. I had locks on my folders for some reason, now all the locks are gone. THANK YOU SOOO MUCH!!!!!!!

  9. THIS WORKED 100%

    My Adobe Photoshop CS6 Icon was missing, and this helped me to restore it again. Simple steps and no risks!

  10. Wow. I can’t believe it, for the first time something like this actually worked 100% flawlessly. Thank you very much, good sir/ma’am

  11. Thank you! I just switched to a new computer and deleted some desktop shortcuts, and this problem happened to me. The solution worked like a charm!!

  12. It dosen’t work in my case. Still the icons are remain as it is……….. 🙁

    Please some one tel me the solution

  13. Yea!!!! This worked! The other fixes I’d tried didn’t work on my Win 7 64 bit pc, but this one did, and it’s easy. Thank you!

  14. Worked–thanks. My issue was that the icon for a program (CorelDRAW) was appearing fine in Explorer, and on the pop-up window when ALT-TABbing, but not on the task bar.

  15. Although, the program file opens fine, the program files in the drive still are missing the icons to their respective programs. Windows 7-64 bit Professional Worth a Shot though.

  16. Although the files open in the c: drive with the correct program, the files in the drive still have the generic labels instead of their respective opening icons. Windows 7 64 bit professional. Worth a try though. Thanks

  17. i have a database its folder is cwcheat then the database is CHEAT and i accidentally opened it with Microsoft words work processor now when i open it it then automatically opens in Microsoft words work processor even if it is a database file please help me how to change its old icon or program back

  18. Oh hell yes this worked. When you’re typing the commands make sure to actually type %userprofile% and not your actual profile name

  19. Absolutely Wonderful!

    Except for the ones (note pad) I changed to the closest I could find before taking your advice, they all returned to normal.

    Thank you!

  20. Great advice!
    This has ended my frustration over not being able to restore the Icons to the format as per the original source.
    Thank you.

  21. Clearing the icon caches didn’t solve this problem for me. However, when I manually created a new shortcut to the exe file, it used the right icon.

    I didn’t even need to delete the old one and replace it with the new one – creating the new shortcut fixed them both, presumably by forcing Windows to reexamine the exe and updates its cache.


Leave a Reply