How to Clear Icon Cache on Mac

May 23, 2022 - 8 Comments

Clear icon cache on the Mac

Occasionally, Mac users may notice that icons in the Finder of MacOS or the Dock of MacOS either display as generic icons, or the icons do not align with what they should (for example, seeing a generic document icon instead of a PDF thumbnail, or seeing a VLC icon instead of a zip archive icon, or seeing a generic application icon rather than Safari icon).

If you experience an issue with the icon display on the Mac, you can manually clear the icon cache, which will force the icon cache to rebuild, thereby resolving the inaccurate display of icons on the Mac.

How to Clear & Reset Icon Caches on Mac

Warning: Because you will be using the terminal and rm commands, it’s a good idea to backup your Mac with Time Machine or your backup method of choice before proceeding with any of this. An incorrectly entered command could lead to permanent data loss, so be sure to use the exact syntax. If you’re not comfortable with the command line, it’s probably better to avoid this completely.

Launch the Terminal and enter the following command and hit return:
sudo rm -rfv /Library/Caches/com.apple.iconservices.store

Next, enter the following command and hit return:

sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder

Finally, you’ll want to restart the Mac in Safe Mode, which also dumps many caches and forces the refresh of caches on the Mac. This process is slightly different depending on whether it’s a Mac with Apple Silicon M chip, or an Intel Mac.

  • For M1 Mac, go to the  Apple menu and choose Shut Down. Wait about 10 seconds. Then press and hold the Power button until you see the Options screen appear. Now press and hold the Shift key, and choose “Continue in Safe Mode” to boot the M-series Mac into Safe Mode.
  • For Intel Mac, restart the Mac and hold down the Shift key until you see the Login Screen to boot into Safe Mode.

Once the Mac has booted into Safe Mode, let it sit for about 5 minutes, then restart the Mac again by going to the  APPLE menu and choosing “Restart”. The icon caches will be refreshed, along with many other caches on the Mac.

The above sequence of terminal commands was found on Github, and for some users that alone may resolve the issue, whereas in testing we found that the added step of restarting into Safe Mode worked to resolve issues with erroneous icon display, or generic icon display in MacOS Finder and MacOS Dock.

Did the above steps work to fix your icon display issues on the Mac? If you found another solution, or use another approach to refresh the icon cache on the Mac, let us know in the comments.

.

Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS, Tips & Tricks, Troubleshooting

8 Comments

» Comments RSS Feed

  1. Bruce says:

    Running OS 13.2 on an M1 Mac, I got the “Operation not permitted” error numerous times on the second command.
    And restarting in safe mode doesn’t do anything to the icons that I can see.

    • Noah says:

      Try putting sudo before the command

      • nymbus says:

        The second command doesn’t work. The command mentioned in the article already has sudo in front of it. It still doesn’t work. It says ‘Operation not permitted’ on Ventura 13.3.1.

  2. Mark Abers says:

    On the first command, Terminal announced that I would be reported! To what or whom, I can’t imagine, given that it’s my computer! But seriously, it indicates that there may be some instructions or advice missing from your article.

  3. William says:

    Thank you so much this worked for me

    My rar files now show the correct program icon !

  4. CHolmes says:

    Terminal commands worked perfectly. I could not figure out how to clear Atom.io icons.

    Thank you so much!!!

  5. Alan Shaw says:

    When I ran the 2nd command I got “operation not permitted”

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site