ThisCalculator

Everyday

How to Clear Icon Cache on Mac

Updated · Standard formula, shown below

If your Mac’s icons are showing wrong images, blank thumbnails, or generic file icons, a corrupted icon cache is often the culprit. Clearing the icon cache forces macOS to rebuild its icon database, which usually fixes display glitches without affecting your files. This guide walks you through the safest methods, from a simple Finder trick to using Terminal commands.

What You’ll Need

  • Administrator access (you’ll need to enter your password for some Terminal commands)
  • A backup of important files (optional but recommended before any system modification)
  • About 10–15 minutes of time

Step-by-Step

Method 1: Restart Finder (Quick Fix)

  1. Open Finder (it’s always running, but you can restart it).
  2. Hold the Option key and right-click the Finder icon in the Dock.
  3. Select Relaunch from the context menu.
  4. Confirm that you want to relaunch if prompted.
  5. Check if the icons are fixed. If not, proceed to Method 2.

Method 2: Reset the Icon Services Database (Terminal)

  1. Open Terminal (found in /Applications/Utilities/).
  2. Type the following command and press Enter. This kills the icon services process, which forces macOS to rebuild the cache on next launch:
    killall Dock
  3. Wait a few seconds for the Dock to restart.
  4. If icons are still wrong, run this command to reset the icon services database:
    sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} ";"
    You’ll be prompted for your admin password (it won’t show as you type).
  5. Then run:
    sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} ";"
  6. Restart your Mac (Apple menu → Restart).

Method 3: Clear the Entire Icon Cache (Terminal, More Thorough)

  1. Open Terminal.
  2. Run the following commands one by one, pressing Enter after each:
    sudo rm -rf /Library/Caches/com.apple.iconservices.store
    sudo rm -rf /System/Library/Caches/com.apple.iconservices.store
  3. Then reset the icon services database as in Method 2 (steps 3–5).
  4. Restart your Mac.

Method 4: Use a Third-Party App (Optional)

  1. Download a reputable Mac maintenance app like Onyx or Maintenance (free, from their official sites).
  2. Open the app and look for a “Cleaning” or “Maintenance” section.
  3. Check the option for “Icon Services” or “Icon Cache” and run it.
  4. Restart your Mac when prompted.

Common Mistakes

  • Not restarting after clearing: The cache is rebuilt at login, so a restart is essential.
  • Deleting the wrong files: Only delete the specific cache files mentioned. Don’t remove other items in /Library/Caches.
  • Using sudo incorrectly: If you mistype a sudo command, you might delete system files. Double-check each command before pressing Enter.
  • Expecting a fix for file corruption: Clearing the icon cache only fixes display issues. If the file itself is damaged, the icon won’t change.

Tips

  • Before clearing the cache, try simply logging out and back in—this often rebuilds the icon cache without any Terminal work.
  • If only a few icons are wrong, they might be from a specific app. Reinstalling that app can fix its icons.
  • Keep your Mac’s storage clean; a full disk can cause cache corruption.
  • After clearing, give macOS a few minutes to rebuild all icons—don’t panic if icons are generic for a short while.

Troubleshooting

Icons still not fixed after following all steps:

  • Check if the issue is specific to one app or file type. If so, the app’s own icon file may be corrupted—reinstall the app.
  • Try creating a new user account and see if the icons are correct there. If they are, the problem is with your user’s cache, not the system. You may need to reset your user’s preferences.
  • Boot into Safe Mode (restart and hold Shift) and then restart normally. Safe Mode clears some caches on boot.

Terminal says “Operation not permitted” even with sudo:

  • This can happen due to macOS’s System Integrity Protection (SIP). You may need to disable SIP temporarily (not recommended for daily use), or use the find method instead of directly deleting system files.

Icons are all generic after clearing:

  • This is normal for a few minutes. If they don’t rebuild, try restarting again.

Frequently Asked Questions

Will clearing the icon cache delete my files?

No. The icon cache only stores image thumbnails and icon references. Your actual files and data are untouched.

How often should I clear the icon cache?

Only when you notice icon display problems. There’s no need to do it regularly; macOS manages the cache automatically.

Can I clear the icon cache without Terminal?

Yes, you can use a third-party app like Onyx, or simply restart your Mac—but a restart alone may not fix stubborn cache issues.

Why do my icons keep getting corrupted?

Common causes include improper shutdowns, disk errors, or third-party apps that modify icon files. Keeping your system updated helps.

Is it safe to use sudo commands?

Yes, if you copy the commands exactly and understand what they do. Always ensure you have a backup before making system changes.

Do I need to clear the cache for each user?

No, the commands in Methods 2 and 3 clear the system-wide cache, which affects all users.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.