4 Ways to Rebuild the Icon Cache on Windows 10 and 11
Icon cache is an icon buffer created by windows for desktop icons. When the desktop icons are changed, the system will automatically write the new icons into the buffer so that the icons will not be restored the next time the computer is restarted. However, as the database grows, the likelihood of the icon cache database becoming corrupted increases. When this happens, icons on your desktop and throughout your operating system may not render correctly or may even appear corrupted. In the following, we will guide you on 4 ways to rebuild the icon cache on windows 10 and 11.
Way 1: Manually rebuild the icon cache
Step 1: Use WIN+E to open File Explorer. Click on the "View" tab and then add a checkmark next to the "Hidden item" to make File Explorer show hidden files and folders.
Step 2: Navigate to the following folder. (Note: Replace "username" with the actual login name for your Windows account.)
C:\Users\UserName\AppData\Local
Step 3: In the local directory, find the file named IconCache.db. Right-click on the file and click Delete.
Step 4: Right-click the Recycle Bin icon on your desktop and click Empty Recycle Bin to clear the Icon Cache.
Step 5: Close all running applications, and reboot your Windows 10/11 PC to automatically create a new IconCache file to rebuild the Icon Cache.
Way 2: Rebuild Icon Cache via Command Prompt
Step 1: Use the Ctrl+Shift+Esc keyboard shortcut to open Task Manager. Under the Processes tab, right-click the Windows Explorer entry and then click End Task to stop Windows Explorer. Once you stop Windows Explorer, the Taskbar and Start Menu will be invisible. However, you can still access the task manager.
Step 2: In Task Manager, click "Run New Task" in the file.
Step 3: In the "Create New Task" window, type cmd.exe and click the OK button to open a command prompt.
Step 4: In Command Prompt, type the following commands one by one and press Enter after each command to execute each command. The following command will delete the IconCache.db file.
CD /d %userprofile%\AppData\Local
Del IconCache.db /a
Exit
Step 5: Click the file under the task manager, click to run a new task, it is the same as Step 2. Enter Explorer.exe, and click the OK button to restart Windows Explorer. In this way, Windows 10/11 will rebuild a new icon cache.
Way 3: Rebuild Icon Cache via PowerShell
Step 1: Before continuing with this work, close and save any work you are working on. Open the file manager and navigate to the following folder.
C:\Users\username\AppData\Local\Microsoft\Windows\Explorer
Note: Replace username with the actual login name for your Windows 10/11 account.
Step 2: Hold down the "Shift" key and right-click on the Explorer folder. Select "Open PowerShell window here".
Step 3: First make sure the PowerShell is in the correct folder by typing the "dir" command. At this point, you will see the iconcache and thumbcache files appear.
Step 4: Use Ctrl+Shift+Esc to open Task Manager, find Windows Explorer and click End task, it is the same as Way 2 step 1.
Step 5: Enter the following command in the PowerShell window and then press enter. This action will delete icon cache files.
del iconcache*
Step 6: Run the dir command to check the list of remaining files. If one or more icon cache files are still in the list, it means some apps are still running in the background. If necessary, close them and repeat the procedure.
Step 7: Press Ctrl+Alt+Del at the same time, and select "Sign out". Log back in. In this way, outdated or missing icons can be rebuilt.
Way 4: Rebuild Icon Cache via executing a batch file
Step 1: Use WIN+R to open Run and enter the following code to open the folder.
%userprofile%\AppData\Local\Microsoft\Windows\Explorer
Step 2: In the opened folder you will see icons like iconcache_16.db, iconcache_32.db, iconcache_48.db, iconcache_256.db , iconcache_idx.db such files. Deleting all of these files will rebuild the Windows 10/11 icon cache.
Step 3: However, if Windows Explorer is using the current file, some files may not be deleted. In this case, we can create a new notepad file, copy and paste the following code into it, save it, then change the suffix of .txt to a .bat file, and then open and run as administrator.
cd /d %userprofile%\AppData\Local\Microsoft\Windows\Explorer
taskkill /f /im explorer.exe
attrib -h iconcache_*.db
del iconcache_*.db /a
start explorer
pause
Step 4: Executing the above batch will restart Windows Explorer, so the desktop will disappear for a while. After the execution, the Windows 10/11 icon cache database is deleted, and then Windows 10/11 will automatically rebuild the icon cache for us.