What icon cache is and why you might need to clear it

Windows 11 stores small pictures of your file and folder icons in a hidden cache so it doesn't have to rebuild them every time you open a window. When this cache gets corrupted or outdated, you see the wrong icon for a file, a generic placeholder instead of the real icon, or an icon that doesn't match what you just changed. Clearing the cache forces Windows to rebuild it from scratch, which usually fixes the problem.

The most common reason to clear icon cache is after you install new software — sometimes the icon doesn't appear correctly until the cache refreshes. You might also need to clear it if you've changed a file type's icon manually and Windows isn't showing the new one, or if icons are displaying as blank squares or the wrong image entirely.

Key Takeaways

  • Icon cache lives in a hidden system folder at C:\Users\[YourUsername]\AppData\Local\IconCache.db, and you must delete the file named IconCache.db, not the whole folder.
  • You must close File Explorer completely before deleting the cache file, or Windows will lock it and prevent deletion.
  • The fastest method is to delete IconCache.db from File Explorer after showing hidden files, then restart your computer.
  • If File Explorer won't let you delete the file, use Disk Cleanup or Command Prompt to force the deletion without restarting first.
  • After deletion, Windows rebuilds the cache automatically the next time you open File Explorer — you don't need to do anything else.

How to show hidden files so you can see the cache folder

The AppData folder where icon cache lives is hidden by default. You need to turn on the option to show hidden files before you can navigate to it. Open File Explorer and look at the top menu bar — click the View tab, then check the box next to Hidden items. That's all you need to do; the hidden folders will now appear in gray text.

If you don't see a View tab, your File Explorer is in a simplified mode. Click the three horizontal lines (hamburger menu) in the top left corner instead, then select View from the dropdown, and check Hidden items.

Delete IconCache.db using File Explorer

This is the most straightforward method. First, close File Explorer completely — not just the window you're looking at, but all File Explorer windows. If you have any folder windows open on your desktop, close those too. Then open File Explorer again and navigate to C:\Users\[YourUsername]\AppData\Local, replacing [YourUsername] with your actual Windows username. You can paste this path directly into the address bar at the top of File Explorer.

Look for the file named IconCache.db — it will be a single file, not a folder. Right-click it and select Delete. Windows will move it to the Recycle Bin. You can empty the Recycle Bin afterward if you want, but it's not necessary. Restart your computer, and Windows will rebuild the cache automatically when you next open File Explorer.

Use Disk Cleanup if File Explorer won't delete the file

Sometimes Windows locks the IconCache.db file even after you close File Explorer, especially if background processes are still running. If you get an error saying the file is in use, try Disk Cleanup instead. Press the Windows key and type Disk Cleanup, then open the app. Select your C: drive from the dropdown and click OK.

In the list of files to delete, look for Temporary files or Recycle Bin — these options sometimes include cached icon data. Check the boxes next to the items you want to remove and click Delete Files. This method is less direct than deleting IconCache.db by name, but it often works when the file is locked. Restart your computer afterward.

Delete the cache using Command Prompt if other methods fail

If File Explorer and Disk Cleanup both fail, you can force deletion using Command Prompt. Press the Windows key, type Command Prompt, right-click it, and select Run as administrator. Type the following command exactly as shown and press Enter:

del %localappdata%\IconCache.db

Command Prompt will confirm the deletion with a message. You don't need to restart immediately — you can close Command Prompt and restart whenever you're ready. When Windows starts up again, it will rebuild the icon cache.

What to expect after clearing the cache

When you restart your computer and open File Explorer, Windows begins rebuilding the cache right away. You might notice that icons appear slightly slower than usual for a few minutes as Windows processes them. This is normal and temporary. Once the cache is fully rebuilt, icon display should return to normal speed.

If the icon problem you were trying to fix doesn't go away after clearing the cache and restarting, the issue is likely something else — a corrupted file association, a problem with the application itself, or a display driver issue. In that case, the icon cache wasn't the cause, and you may need to troubleshoot the specific application or file type instead.

Frequently Asked Questions

Is it safe to delete IconCache.db?

Yes, completely safe. It's a temporary file that Windows recreates automatically. Deleting it won't harm your system, your files, or any installed software. The worst that can happen is icons display slowly for a few minutes while the cache rebuilds.

Will I lose any files or settings if I clear icon cache?

No. Icon cache only stores the visual representation of icons — the small pictures Windows displays. Your actual files, folders, and all your settings remain untouched. Only the appearance of icons is affected.

Do I need to restart my computer after deleting the cache?

Yes, restarting is the most reliable way to ensure Windows rebuilds the cache cleanly. You can sometimes see the new icons without restarting, but a full restart guarantees the cache is completely refreshed and any lingering locks are cleared.

What if the IconCache.db file doesn't exist in that folder?

If you navigate to AppData\Local and don't see IconCache.db, it may have already been deleted or Windows may have stored it elsewhere. Try running Disk Cleanup or restarting your computer anyway — sometimes Windows creates a new cache file on startup, and the rebuild process alone can fix icon display problems.

Can I prevent icon cache problems in the future?

Not really — cache corruption is rare and usually happens after a Windows update or when installing software with custom icons. The best you can do is keep Windows updated and avoid installing software from untrusted sources, which is good practice anyway.