| sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |
Unfortunately it doesn't help with the invisible Finder icons (Yosemite DP1-3)
@scherii This worked for me on Yosemite DP3!
It's what I needed to do after replacing folder icons with LiteIcon.
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 mv /Library/Caches/com.apple.iconservices.store com.apple.ic
Just being careful on the last one (renaming instead of removing)
Thank you! This helped with my issue. Was trying to install Java 8, which requires "10.7+". I guess it recognized 10.10 as 10.1.0 and wouldn't let me install it. I had to edit my systemversion.plist to install it, (risky and stupid); and it messed up my icons even after I reverted the .plist to 10.10 after installing.
This command fixed it! I really do appreciate you posting this.
If you only want to update one Application icon, ie, in App.app/Contents/Resources/App.icns just touch the App.app folder. (I've read you need to do the Info.plist as well sometimes, although I've never needed to.)
Close the finder windows and:
touch /Applications/App.app
touch /Applications/App.app/Contents/Info.plistYou can refresh the dock icon cache using the commands above, also do a killall Dock to restart it. Personally I would just drag the application in question, off the dock and re-start / keep in dock, because this is generally a one off thing. As always, script it if possible / and you're doing it a lot.
@jasonm23 Nice!
touch /Applications/App.app
@jasonm23 Worked perfectly! Thank you!
touch /Applications/App.app
touch /Applications/App.app/Contents/Info.plist
killall Dock
@jasonm23 Thanks, worked flawlessly!
@jasonm23 very nice, almost TOO easy.
@jasonm23 Simple and for me the first trick that does work. Superthanks! :)
@tcelestino you need to replace 'App.app' in your command with the application name you want to 'touch' (eg. Evernote.app)
The touch commands worked for me! Thanks
Awesome. I've had a generic app icon for a particular app and it's been bugging me for months. I finally hit on the correct Google search and ended up here.
touch is the secret sauce.
Changing (and applying) app settings using whatever UI the app provides for doing so may also work (effectively this will do what touch does, but without possible side effects that makes the app unhappy).
Thanks, this was very helpful. I recently had corruption of almost every Application icon (unable to launch) after upgrading to 10.11.3.
After many maneuvers, I eventually fixed that by rebuilding the "Launch Services" database with Onyx.
However, the Dock icons were still corrupt. Running your script here and then "killall Dock" fixed the problem.
Worked for me after updating to 10.11.3. Thanks!
Nice tip.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
sudo find /private/var/folders -name com.apple.iconservices -exec rm -rf {} \; # Without `/` after `folders`This two commands are helpful!
Works on 10.11
+1. Thanks for the tip!
Thanks.. This fixed my issue: Fresh installed El Capitan, installed apps, migrated over documents. Some document icons displayed as a blank generic file (but only when displayed as a small icon).
This command worked fine. Just know you need to enter user password for it at the prompt.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
This one failed for me, I think it couldn't find it.
sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;
This resulted in an odd folder in my user's home directory which I just deleted.

sudo mv /Library/Caches/com.apple.iconservices.store com.apple.ic
Now I want to find an App's icns that I once replaced but I don't know where it is.I know that the DEFAULT .icns is in the /Applications/app.app folders.
The two commands above did not work for me on OS X 10.11.4. After running them, and resetting my machine, my file icons are still of an old app I uninstalled.
sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;
sudo rm -rf /Library/Caches/com.apple.iconservices.store
killall Dockworked for me on OSX El Capitan

Pretty sweet. Saved the face of my dock after I migrated to OS X Yosemite DP1 from Mavericks.