Key Points
- The Windows icon cache stores thumbnail-sized icon images to improve display performance; when it becomes corrupted, icons may appear blank, incorrect, or go missing entirely.
- There are four ways to rebuild the icon cache: via Command Prompt, File Explorer (GUI), PowerShell, or a single-command quick fix using ie4uinit.exe.
- The ie4uinit.exe quick fix is the fastest method and does not require a reboot, making it a good first step before trying more involved approaches.
- Rebuilding the icon cache only removes cache files and has no impact on your personal data, installed apps, or system settings.
- If icons are still broken after rebuilding the cache, additional steps such as resetting file associations or running the System File Checker (SFC) may be required.
This tutorial demonstrates how to rebuild the icon cache in Windows 10 and Windows 11. Instructions are provided for using the Command Prompt, and a batch script is also included for automating the process.
While the caching of icons in Windows assists with performance, if this cache is corrupted, it can lead to the display of incorrect or corrupted/distorted icons, or icons missing or otherwise not being displayed. Rebuilding the icon cache by deleting it (after which it will automatically regenerate) can resolve these issues.
Ease the complexities of resolving Windows endpoint issues with NinjaOne.
At a glance
Short on time? No problem! Here’s a quick cheat sheet:
| Method | Technical level | Reboot required? | Best for |
| ie4uinit.exe Quick Fix | Beginner | No | Fast first attempt |
| File Explorer (GUI) | Beginner | Yes | Non-technical users |
| Command Prompt | Intermediate | Yes | Standard fix |
| Batch File | Intermediate | Recommended | Repeatable/automated |
| PowerShell | Advanced | Yes | IT pros/sysadmins |
How to rebuild the icon cache using the Command Prompt in Windows 10 and Windows 11
Before proceeding, take note of the following:
- Save all open files and close any running applications before proceeding.
- You must be logged in as an administrator to perform these steps.
- It is recommended to perform a full system backup before running any commands found on the internet.
- These steps apply to all editions of Windows 10 and Windows 11, including Home, Pro, Enterprise, and Education.
Method 1: Single-command quick fix (ie4uninit.exe)
The ie4uinit.exe -show command forces Windows to refresh icon associations and can resolve minor icon display issues without requiring a reboot. This is generally considered the first troubleshooting strategy to consider, especially if you’re only fixing one device.
- Open Command Prompt.
- Type the following command and press Enter.
ie4uinit.exe -show
- Wait a few seconds and check whether your icons have returned to normal.
Note: If the issue persists, proceed to one of the methods below.
Method 2: Using File Explorer (GUI)
- Open File Explorer, and select the View tab.
- Click Options > Change folder and search options
- In the View tab > Show hidden files, folders, and drives > Ok
- In the File Explorer, navigate to the following path: (Replace YourUsername with your actual Windows username)
C:\Users\YourUsername\AppData\Local
💡 Alternatively, you can paste %localappdata% directly into the File Explorer address bar and press Enter to go directly to this folder.
- Locate and delete the file named IconCache.db.
C:\Users\YourUsername\AppData\Local\Microsoft\Windows\Explorer
- Delete all files beginning with iconcache in this folder.
- Restart your computer. Windows will automatically regenerate the icon cache.
- Once done, you can re-hide system files by returning to the Folder Options and re-selecting Don’t show hidden files, folders, and drives.
Method 3: Using Command Prompt
Then,
- Open the Command Prompt from the Start menu, or right-click on the Start button and select Run.
- Type the command cmd.exe in the Run dialog and press OK.
- Enter the following commands in the Command Prompt (enter each line as a separate command) in the order displayed:
taskkill /IM explorer.exe /F
DEL /A /F /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*.*”
These commands will force stop the explore.exe process and then delete the icon cache files. Once your device is rebooted, the cache will be regenerated.
- Run the following command when you are ready to restart your PC:
shutdown /R /F /T 00
Alternatively, you can:
- Relaunch Windows Explorer by pressing Ctrl+Shift+Escape to open the Task Manager
- Select File > Run new task, then enter explorer.exe and pressing OK
However, rebooting is usually the easier method.
Method 4: Using batch file
- Copy and paste the script below into a new Notepad file:
@echo off
echo.
echo Killing the Windows Explorer process
taskkill /IM explorer.exe /F
echo.
echo Deleting the Icon Cache
DEL /A /F /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*.*”
echo.
echo Restarting the Windows Explorer process
start explorer.exe
echo.
echo The icon cache has been deleted and will be regenerated. It is recommended to reboot your device.
pause
- Save this file with the .bat extension (for example, clear_icon_cache.bat) to create a batch file.
You can then run this script whenever you want to rebuild the Windows icon cache.
Method 5: Using PowerShell
- Open PowerShell as an administrator.
- Run the following script:
# Stop Windows Explorer
Stop-Process -Name explorer -Force
# Delete icon cache files
Remove-Item "$env:LOCALAPPDATA\IconCache.db" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\iconcache*" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\LocalState\AppIconCache*" -Recurse -Force -ErrorAction SilentlyContinue
# Restart Windows Explorer
Start-Process explorer
Write-Host "Icon cache cleared. Please reboot your device to complete the process." -ForegroundColor Green
```
- Once the script has run, reboot your device to allow the icon cache to fully regenerate. The `-ErrorAction SilentlyContinue` parameter ensures the script runs cleanly even if some cache files do not exist on the target machine.
Troubleshooting common issues
If your icons are still displaying incorrectly after rebuilding the icon cache, try the following steps:
1. Reset file associations
Incorrect file associations can cause the wrong icon to display for certain file types. Resetting file associations to their defaults ensures the correct application, and its corresponding icon, is assigned to each file type. This can be done via Settings > Apps > Default Apps.
2. Run the System File Checker (SFC)
Corrupted system files can sometimes cause persistent icon issues. Open Command Prompt as an administrator and run:
sfc /scannow
This will scan and attempt to repair any corrupted Windows system files.
3. Check for Windows Updates
Pending Windows Updates can occasionally cause display issues, including icon corruption. Navigate to Settings > Windows Update and ensure your system is fully up to date.
4. Clear the thumbnail cache
If you are experiencing broken thumbnail previews in File Explorer in addition to icon issues, you may also need to clear the thumbnail cache. This is a separate process from rebuilding the icon cache.
5. Perform a system restore
If the issue began after a recent change, such as a software installation or Windows update, performing a system restore to a point before the change occurred may resolve the problem.
Diagnosing and fixing Windows issues in enterprise environments and for remote workers
Diagnosing and resolving frustrating Windows issues (such as corrupted and missing icons by rebuilding the icon cache) is a routine task for IT support teams. Remote Access by NinjaOne streamlines this process by allowing you to initiate remote access connections directly from support tickets – reducing the time it takes to resolve small support issues so you can focus on maintaining the reliability and security of your wider IT infrastructure.
With NinjaOne, you can access managed and unmanaged devices from both your own desktop or mobile devices, allowing you to assist users from anywhere. You can also initiate file transfers, launch remote terminal windows, and chat with users to ensure that support tickets are always solved in as little time as possible.
Troubleshoot end-user issues with NinjaOne’s tools for MSPs.