Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clear the icon cache on a Mac when you start seeing generic icons in Finder or the Dock
sudo rm -rfv /Library/Caches/com.apple.iconservices.store; 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
@hidsh

This comment has been minimized.

Copy link

hidsh commented May 31, 2018

Good gist! Works fine for my Mac! thx!

@deadlyicon

This comment has been minimized.

Copy link

deadlyicon commented Jun 5, 2018

this fixed my files set to open with VLC having generic white icons :D

I also did this brew cask install qlvideo >D

@lastgleam

This comment has been minimized.

Copy link

lastgleam commented Oct 4, 2018

you are my savior. thanks!

@dgaff

This comment has been minimized.

Copy link

dgaff commented Oct 4, 2018

Wow. Thanks so much for this.

@snowyoneill

This comment has been minimized.

Copy link

snowyoneill commented Nov 21, 2018

Danke! Fixed my preview issues right up.

@albertofwb

This comment has been minimized.

Copy link

albertofwb commented Jan 8, 2019

that works.

@arsradu

This comment has been minimized.

Copy link

arsradu commented Mar 22, 2019

Thank you so much! Fixed it in a matter of seconds.

@johnwyles

This comment has been minimized.

Copy link

johnwyles commented Mar 29, 2019

The touch command effectively does nothing (since they are all directories) so you can lose that part

@Jeronimystro

This comment has been minimized.

Copy link

Jeronimystro commented Apr 17, 2019

Help! It made it worse! Instead of just Stickies having a generic icon, now Safari, Mail, Messages and Daylite all have generic icons too!

Suggestions anyone?

@Jeronimystro

This comment has been minimized.

Copy link

Jeronimystro commented Apr 24, 2019

Hey, @ismyrnow. The command you posted initially made the situation way worse on my 2018 MBP, but after a couple of restarts many icons since slowly returned - including Stickies - either after restarting the computer or subsequent launches of the app, but some have remained stubbornly generic. Messages for example. Can you help?

@Jeronimystro

This comment has been minimized.

Copy link

Jeronimystro commented Apr 29, 2019

@ismyrnow. UPDATE: All my app icons have since restored themselves, gradually. Most if not all the remaining ones repopulated when the app in question was opened.

@aminmirr

This comment has been minimized.

Copy link

aminmirr commented Jun 1, 2019

most of them didn't fix and the error is this:
touch: /Applications/(name of an app).app: Operation not permitted

@ing0mar

This comment has been minimized.

Copy link

ing0mar commented Jul 15, 2019

I made an account just to thank you op. I screwed up my Pock icons by clearing the cache and have no knowledge of how these things work

@widiu7omo

This comment has been minimized.

Copy link

widiu7omo commented Nov 10, 2019

thanks. it works on Mojave 10.14.6

@remicarreiro

This comment has been minimized.

Copy link

remicarreiro commented Mar 25, 2020

Not working for me in Catalina :( Still seeing generic icons for my video media associated with IINA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.