How to Rebuild the Icon Cache in Windows 10
The icons that display for files in Windows are saved in an icon cache so they can be displayed quickly instead of having to manually scan and slowly load them each time.
The icon cache can sometimes become corrupted causing the icons of files to display incorrectly or distorted. When this happens, the icon cache needs to be deleted to reset and automatically recreate it.
Rebuilding the icon cache will not help with the following icon issues:
- The icon of a shortcut not displaying properly due to the target source of the shortcut was moved or deleted. You may need to recreate a new shortcut directly from the source (ex: program's exe) file to replace it instead.
- All icons for a specific file extension display the wrong icon. This may be due to setting the wrong association for what app to open the file type instead. If so, restoring the default association of the file extension will fix this issue.
- Thumbnails of folders, pictures, videos, and documents.
This tutorial will show you how to rebuild the icon cache to clear and reset it for your account in Windows 10.
For a Windows 11 version of this tutorial, see:
Rebuild Icon Cache in Windows 11
Contents
- Option One: To Rebuild the Icon Cache using a BAT file
- Option Two: To Rebuild the Icon Cache in the Command Prompt
1 Click/tap on the download button below to download the file below.
Rebuild_Icon_Cache.bat
Download
Code:@echo off set iconcache=%localappdata%\IconCache.db set iconcache_x=%localappdata%\Microsoft\Windows\Explorer\iconcache* echo. echo The explorer process must be temporarily killed before deleting the IconCache.db file. echo. echo Please SAVE ALL OPEN WORK before continuing. echo. pause echo. If exist "%iconcache%" goto delete echo. echo The %localappdata%\IconCache.db file has already been deleted. echo. If exist "%iconcache_x%" goto delete echo. echo The %localappdata%\Microsoft\Windows\Explorer\IconCache_*.db files have already been deleted. echo. exit /B :delete echo. echo Attempting to delete IconCache.db files... echo. ie4uinit.exe -show taskkill /IM explorer.exe /F timeout /t 2 >nul del /A /F /Q "%iconcache%" del /A /F /Q "%iconcache_x%" start explorer.exe
2 Save the .bat file to your desktop.
3 Close and save anything that you are working on before proceeding. The next steps will involve killing explorer and restarting the PC.
4 Run the .bat file.
5 Unblock the .bat file.
6 Follow the instructions in the command prompt to rebuild the icon cache. (see screenshot below)
7 If the icons are still not displaying properly after rebuilding the icon cache, then download and merge the .reg file for the .ico (ICO) option here to restore the default associations of .ico (icon) files in Windows 10.
1 Close and save anything that you are working on before proceeding. The next steps will involve killing explorer and restarting the PC.
2 Open a command prompt.
3 Copy and paste each command below one at a time into the command prompt, and press Enter after each command.4 If the icons are still not displaying properly after rebuilding the icon cache, then download and merge the .reg file for the .ico (ICO) option here to restore the default associations of .ico (icon) files in Windows 10.
ie4uinit.exe -show
taskkill /IM explorer.exe /F
DEL /A /Q "%localappdata%\IconCache.db"
DEL /A /F /Q "%localappdata%\Microsoft\Windows\Explorer\iconcache*"
DEL /F /S /Q "%localappdata%\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\localstate\AppIconCache\*.*"
shutdown /r /f /t 00
This last command will instantly restart the computer.
That's it,
Shawn Brink
Related Tutorials
- How to Change Icon Cache Size in Windows
- How to Clear and Reset the Thumbnail Cache in Windows 10
- How to Reset Notification Area Icons in Windows 10
- How to Rebuild Font Cache in Windows 10
- How to Clear Your Live Tile Cache on Start in Windows 10