General Rebuild Icon Cache in Windows 11

  • Thread starter Thread starter Brink
  • Start date Published: Start date Updated Updated:
  • Tags Tags
    icon

Configuration_banner.png

This tutorial will show you how to rebuild the icon cache to clear and reset it for your account in Windows 10 and Windows 11.

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 pictures, videos, and documents.

Contents





Option One

Refresh Icons using Command


1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.

2 Copy and paste the ie4uinit.exe -show command into Windows Terminal, and press Enter. (see screenshot below)

3 If the refresh doesn't sort the icons, you can try Option Two or Option Three.

ie4uinit.exe-show.png





Option Two

Rebuild Icon Cache using BAT file


1 Click/tap on the download button below to download the file below.

Rebuild_Icon_Cache.zip


(Content of BAT file for reference)
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 ZIP file to your desktop.

3 Save and close anything that you are working on before proceeding. The next steps will involve killing the explorer process while rebuilding the icon cache.

4 Unblock the ZIP file.

5 Extract the BAT file from the ZIP file.

6 Run the BAT file.

7 Follow the instructions in the command prompt to rebuild the icon cache. (see screenshot below)

reset_icon_cache.png

8 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.




Option Three

Rebuild Icon Cache in Command Prompt


1 Close and save anything that you are working on before proceeding. The next steps will involve killing the explorer process while rebuilding rebuild the icon cache.

2 Open Windows Terminal, and select Command Prompt.

3 Copy and paste each command below one at a time into Windows Terminal, and press Enter after each command.

ie4uinit.exe -show

taskkill /IM explorer.exe /F

DEL /A /F /Q "%localappdata%\IconCache.db"

DEL /A /F /Q "%localappdata%\Microsoft\Windows\Explorer\iconcache*"

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.


That's it,
Shawn Brink


 

Attachments

Last edited:
It WAS a OneDrive issue. I tried to rebuild the cache several times, and one folder still showed app icons instead of thumbnails. That folder had been moved by OneDrive from c:\Pictures to C:\Users\[me]\OneDrive\Documents. It was set as a local folder, but that wasn't sufficient. Moving it back to c:\Pictures fixed the problem.
Speaking about OneDrive, how does one make programs such as PowerShell look in the C:\Users\[me]\Documents\PowerShell instead of the C:\Users\[me]\OneDriveDocuments\PowerShell
 

My Computer

System One

  • OS
    Windows XP/7/8/8.1/10/11, Linux, Android, FreeBSD Unix
    Computer type
    Laptop
    Manufacturer/Model
    Dell XPS 15 9570
    CPU
    Intel® Core™ i7-8750H 8th Gen 2.2Ghz up to 4.1Ghz
    Motherboard
    Dell XPS 15 9570
    Memory
    64GB using 2x32GB CL16 Mushkin redLine modules
    Graphics Card(s)
    Intel UHD 630 & NVIDIA GeForce GTX 1050 Ti with 4GB DDR5
    Sound Card
    Realtek ALC3266-CG
    Monitor(s) Displays
    15.6" 4K Touch UltraHD 3840x2160 made by Sharp
    Screen Resolution
    3840x2160
    Hard Drives
    Toshiba KXG60ZNV1T02 NVMe 1TB SSD
    PSU
    Dell XPS 15 9570
    Case
    Dell XPS 15 9570
    Cooling
    Stock
    Keyboard
    Stock
    Mouse
    SwitftPoint ProPoint
    Internet Speed
    Comcast/XFinity 1.44Gbps/42.5Mbps
    Browser
    Microsoft EDGE (Chromium based) & Google Chrome
    Antivirus
    Windows Defender that came with Windows

Latest Support Threads

Back
Top Bottom