Friday, February 1, 2019

Clearing the Icon Services Cache in Mojave

Howard Oakley:

After all these 35 years, and numerous bug reports, Apple still doesn’t provide any tool to rebuild the IconServices cache. You might find that restarting in Safe mode (with the Shift key held down), leaving your Mac a couple of minutes, then restarting back in normal mode, might do the trick, if you’re lucky, but as far as I know, that doesn’t force the IconServices cache to be rebuilt. Neither does resetting the SMC or NVRAM, although sometimes they’re recommended.

If all else fails, and you have to force the IconServices cache to be rebuilt, the only way seems to be to delete it at the command line.


The command to remove the main store is

sudo rm -rfv /Library/Caches/

That for the subsidiary data is

sudo find /private/var/folders/ \( -name -or -name \) -exec rm -rfv {} \;

which includes the Dock icon cache too.

Once you have done that, you’ll need to restart and give your Mac plenty of time to rebuild the caches.

Previously: Clearing the Icon Services Cache in Yosemite.

Update (2020-05-18): Picho13:

iconservicesagent basically went crazy and used an astonishing 32GB (yes, GB) of physical RAM on my computer, before running out and continuing to use the SSD space via swap memory to keep using RAM until it ran out of space on the SSD.

Clearing the cache apparently fixed this.

14 Comments RSS · Twitter

Man, I love you, thanks a lot.

THANK YOU! Your method is the only one that actually worked on a Mojave-running laptop. Well done.

thanks a lot. It was very helpful

Thanks for that fix, even it doesn't work in my case. But as I had the same issue and spend hours on fixing it, I would like to share "my" solution:

I had Goggle Filestream installed on my Mac. After deleting (uninstalling) it, all thumbnails showed up immediately. Crazy but true...

I just ran your process. I am about to restart my Mac. Need to update the software first. Based on how smoothly it worked and the comments, i have no doubt it will work. So I want to thank you ahead of time! You rock!

THANKS. I had a crazy situation where any time I opened my Documents folder, the iconservicesagent process would immediately take up all free memory, rendering my computer unusable (frozen, with only the mouse moving, but sometimes crashing it).

This is the only thing that worked. I spent days on the net looking for a solution for Catalina and nothing worked. Then I ran your two commands and rebooted and I now have a functional laptop again. Well done.

One that helped me, was just restore all your Mac icons to it`s default

Thank you so much for this. Worked perfectly. Yours is the only solution that has worked in the past 2 hours.

Wow. I had already started loading bullets in my gun. Thank you! You are a llifesaver.

It REALLY worked for me also (Catalina).
I was getting beachballed every time I went to my iCloud drive or my Document folder.

You're awesome.

Giacomo Barzon

the operation for the subsidiary data doesn't work, terminal say Operation Not Permitted in any operation of this command.. why? please help me.

[…] Force the IconService cache to be rebuilt using these steps: […]

I believe deleting /Library/Caches/ should be sufficient. This is the actual cache.

On my system (Monterey) the file /private/var/folders/X/Y/ hasn't changed since the installation. I don't know what's stored in there, but it's too small (less than 1 MB) to store icons.

Could you please explain why you recommend delete the file? Is there a way to make the file human-readable?

(For clarity: I'm not talking about the file /private/var/folders/X/Y/ I'm aware that it can make sense to delete it.)

Leave a Comment