Clearing the Icon Services cache in Yosemite

After installing or updating a system to Yosemite, I have seen blank (missing) icons on several Macs. I have also seen cases where the desktop doesn’t get updated after a change to the document icons in the application itself (which happens as developers update their apps to use the new icon guidelines.)

This is an example of just another cut:

xScope_IconBug

If you’re seeing any weird behavior with icons in Yosemite, the chances are good that the Icon Services cache is corrupted and needs to be reset. Here’s how you do it using the Terminal:

$ sudo find /private/var/folders/ \
  -name com.apple.dock.iconcache -exec rm {} \;

$ sudo find /private/var/folders/ \
  -name com.apple.iconservices -exec rm -rf {} \;

$ sudo rm -rf /Library/Caches/com.apple.iconservices.store

After running those commands, you’ll need to restart your Mac.

Ideally, there would be some way to do this using the underlying iconservicesd or iconservicesagent commands, but that didn’t work out too well. Hopefully Apple will find a better way to do this than using a Terminal.