Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@KenanSulayman

This comment has been minimized.

KenanSulayman commented Jun 4, 2014

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

@scherii

This comment has been minimized.

scherii commented Jul 9, 2014

Unfortunately it doesn't help with the invisible Finder icons (Yosemite DP1-3)

@inket

This comment has been minimized.

inket commented Jul 10, 2014

@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)

@NotAlexNoyle

This comment has been minimized.

NotAlexNoyle commented Aug 11, 2014

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.

@jasonm23

This comment has been minimized.

jasonm23 commented Oct 18, 2014

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.plist

You 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.

@mabbbbbbbbbbb

This comment has been minimized.

mabbbbbbbbbbb commented Dec 31, 2014

@jasonm23 Nice!

touch /Applications/App.app
@MarkLeMerise

This comment has been minimized.

MarkLeMerise commented Mar 5, 2015

@jasonm23 Worked perfectly! Thank you!

touch /Applications/App.app
touch /Applications/App.app/Contents/Info.plist
killall Dock
@Ardakilic

This comment has been minimized.

Ardakilic commented Mar 23, 2015

@jasonm23 Thanks, worked flawlessly!

@Robpol86

This comment has been minimized.

Robpol86 commented Apr 2, 2015

@jasonm23 very nice, almost TOO easy.

@FelixAkk

This comment has been minimized.

FelixAkk commented Apr 19, 2015

@jasonm23 Simple and for me the first trick that does work. Superthanks! :)

@tcelestino

This comment has been minimized.

tcelestino commented May 9, 2015

why?
Imgur

Oo

@binaryrefinery

This comment has been minimized.

binaryrefinery commented May 17, 2015

@tcelestino you need to replace 'App.app' in your command with the application name you want to 'touch' (eg. Evernote.app)

@dessalines

This comment has been minimized.

dessalines commented Jun 15, 2015

The touch commands worked for me! Thanks

@spotcatbug

This comment has been minimized.

spotcatbug commented Nov 18, 2015

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.

@orome

This comment has been minimized.

orome commented Dec 4, 2015

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).

@dkmn

This comment has been minimized.

dkmn commented Jan 30, 2016

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.

@legomind

This comment has been minimized.

legomind commented Feb 6, 2016

Worked for me after updating to 10.11.3. Thanks!

@kaishin

This comment has been minimized.

kaishin commented Feb 12, 2016

Nice tip.

@chuyik

This comment has been minimized.

chuyik commented Feb 19, 2016

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

@ProbonoBonobo

This comment has been minimized.

ProbonoBonobo commented Mar 11, 2016

@jasonm23

+1. Thanks for the tip!

@VSEphpbb

This comment has been minimized.

VSEphpbb commented Mar 16, 2016

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.
screen shot 2016-03-16 at 8 31 04 am

sudo mv /Library/Caches/com.apple.iconservices.store com.apple.ic
@skipjackyu

This comment has been minimized.

skipjackyu commented Mar 23, 2016

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.

@Falven

This comment has been minimized.

Falven commented Apr 26, 2016

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.

@malyw

This comment has been minimized.

malyw commented Oct 1, 2016

sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;
sudo rm -rf /Library/Caches/com.apple.iconservices.store
killall Dock

worked for me on OSX El Capitan

@richardackroyd

This comment has been minimized.

richardackroyd commented Oct 29, 2016

+1 for chuyik on Yosemite - ran both finds (split down to a find and manual removal - call me paranoid) - following by killall Dock and everything back to normal after some very screwy corrupted icons

@toufikhamdani

This comment has been minimized.

toufikhamdani commented Nov 3, 2016

Hello,

I'm trying with the Notes app but it doesn't work for me :
Toufiks-MacBook-Pro:~ administrator$ touch /Applications/Notes.app
touch: /Applications/Notes.app: Operation not permitted

screenshot at nov 03 16-07-34

@beyondthetech

This comment has been minimized.

beyondthetech commented Nov 7, 2016

+1 for malyw.

sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} ;
sudo rm -rf /Library/Caches/com.apple.iconservices.store
killall Dock
killall Finder

Only when I restarted the Finder did the above work for me in Sierra 10.12.1

@DonRichards

This comment has been minimized.

DonRichards commented Dec 8, 2016

+1 for malyw & beyondthetech

sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} ;
sudo rm -rf /Library/Caches/com.apple.iconservices.store
killall Dock
killall Finder

@ghost

This comment has been minimized.

ghost commented Jan 2, 2017

Thanks everyone. Here is a combined single-line command which should work on both old and new macOS versions:

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; killall Dock; killall Finder
@liquidfrollo

This comment has been minimized.

liquidfrollo commented Jan 5, 2017

The original version worked for me on OSX sierra for finder and launchpad. I ran the command and did killall Dock and everything is back to normal! thanks.

@ghost

This comment has been minimized.

ghost commented Jan 10, 2017

@liquidfrollo My command above is literally a combination of all commands ever mentioned above. As a oneliner. So it will work on every OS.

But even that command doesn’t fix all cached icons. So another way to solve it is to Get Info, drag a different icon to the icon area, then press Backspace to remove the other icon and “revert” to what is in the app bundle. That will always make the correct icon refresh.

@bernex

This comment has been minimized.

bernex commented Feb 4, 2017

Hi,
can we do it for one application not global clear cache?

@bernex

This comment has been minimized.

bernex commented Feb 4, 2017

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; killall Dock; killall Finder

do not help me in Sierra (

Finder have new icon, but Dockers icon is same (

@Niresh12495

This comment has been minimized.

Niresh12495 commented Feb 18, 2017

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
This will work
Clear macOS icon cache

@ghost

This comment has been minimized.

ghost commented Mar 4, 2017

GUYS! After years of trying the commands above (literally, 2-3 years), with almost no success due to macOS strong caching. I've discovered that the BEST, most RELIABLE way to rebuild the icon cache in macOS is to right click the app, "Get Info", drag ANYTHING to its icon in the top left of the "Get Info" window (you can drag a FOLDER to its icon if you want to) to assign a new temporary icon, then CLICK the icon in the "get info" window and press BACKSPACE to clear it. Now that forces macOS to re-read the .icns file inside the bundle itself. And will cache the new one. Far more reliable than any attempts to clear caches. None of the commands above have ever worked for me. But my solution works every time!

@unculcated

This comment has been minimized.

unculcated commented Mar 10, 2017

good job thanks

@ramiroaraujo

This comment has been minimized.

ramiroaraujo commented Mar 16, 2017

@SteveJobzniak hahahah, I love the bold fat text explaining this simple solution :) I've had the same issue for ages, and indeed solved it with this simple trick
Thanks!

@ghost

This comment has been minimized.

ghost commented Mar 28, 2017

@ramiroaraujo Haha. Sometimes shouting is needed. ^_^

@sytxerr

This comment has been minimized.

sytxerr commented Jun 7, 2017

@SteveJobzniak you save my day bro... :)

@glemiere

This comment has been minimized.

glemiere commented Jun 11, 2017

I fixed it by going in the activity monitor and shutting down WindowServer. I just did it under inspiration, no idea if it's what fixed the problem, however you can try!

@elgs

This comment has been minimized.

elgs commented Jun 19, 2017

@SteveJobzniak saved my butt. Thanks.

@sinedsem

This comment has been minimized.

sinedsem commented Jun 22, 2017

@SteveJobzniak perfect!

@astrostl

This comment has been minimized.

@ActionScripted

This comment has been minimized.

ActionScripted commented Aug 22, 2017

@jeffersonsetiawan

This comment has been minimized.

jeffersonsetiawan commented Sep 18, 2017

@SteveJobzniak After I update to High Sierra GM candidate, I have issue of missing small icon in the column list view Finder and notification. I think I just miss the small icon thumbnail.

How to fix it? I tried your way, but can't fix this issue.

screen shot 2017-09-18 at 12 07 28

@soleinvisibile

This comment has been minimized.

soleinvisibile commented Oct 3, 2017

I googled a lot and tried all, I mean A L L the methods above - deleting, Safe Boot, etc - I even switched from Yosemite to El Capitan and now High Sierra, but nothing to do.
Please help me: how do I make THIS icon to appear again on menu bar?
schermata 2017-10-03 alle 08 59 32

@BruceLEO1969

This comment has been minimized.

BruceLEO1969 commented Oct 4, 2017

Cool

@frickenate

This comment has been minimized.

frickenate commented Oct 18, 2017

ATTENTION TO ALL WHO GET PERMISSION DENIED ERRORS RUNNING THE COMMANDS!

I fixed this issue for myself on 10.13 High Sierra the first time by doing exactly what I describe below. Follow these directions and you should be fixed as well.

With newer versions of macOS, the commands do not work because the files are protected by SIP (System Integrity Protection). This protection means you cannot, even as root user, rm the cache files, or touch /Applications/* and their Info.plist files.

The good news is all you have to do is boot into Recovery Mode! You don't need to disable SIP, as the files involved here can be manipulated in the Terminal directly from Recovery Mode.

Steps:

  1. Boot into Recovery Mode. With machine shut down, power it on and immediately hold down Command+R until the logo appears - or if you have a firmware password, until you are prompted for the password.

  2. Once Recovery is booted, choose the Disk Utility option from the list. If your OSX volume is not already mounted, you need to mount it now. Select the OSX disk; yours might be renamed to something else - but ignore OS X Base System as that is the recovery volume, not your operating system. Click the Mount button in the action bar near the top. If you need to provide a password, I believe it's the account password of any account, or perhaps any Administrator account, or perhaps your firmware password. Whatever the case, one of the passwords you normally use to boot the computer will be the password required here to mount the volume.

  3. Close the Disk Utility app. Now open the Terminal app by going to the Utilities menu and selecting Terminal. It's not in the list of options Recovery offers; you must look in the Utilities menu bar.

  4. IMPORTANT: You are NOT running the exact same commands others have posted!!! /Applications and /Library/Caches while in Recovery Mode point to the base recovery volume you are booted into, not your actual operating system. This is why we needed to mount the OSX volume in Disk Utility in Step 2.

  5. First, get to the root directory of your operating system's volume. By default this will be:

cd /Volumes/OSX

If that produces an error, then your volume name is not the default OSX. You will want to ls /Volumes and look for the name that you changed it to at some point. Important: you do not want OS X Base System! That is the recovery volume, not your operating system. Once you find the name (example: MyMachine), change to that directory with cd "/Volumes/MyMachine" - I included quotes in case your volume name contains spaces.

  1. Make sure you're in the right directory by typing pwd. You should see output like /Volumes/OSX (default) or your custom volume name such as /Volumes/MyMachine.

  2. Now run the following commands.

  • NOTE 1: IF YOU DID NOT FOLLOW STEPS 1 THROUGH 6, THESE COMMANDS WILL NOT WORK! GO BACK AND DO ALL STEPS, YOU CANNOT SKIP ANY!

  • NOTE 2: There is no / prefix at the start of the paths, as you are running these relative to the operating system volume.

  • NOTE 3: Please run one command at a time. Combining into one line makes it too easy to cause errors difficult to diagnose.

  • NOTE 4: No need to use sudo - you are already dropped into root user.

  • NOTE 5: The last command will take a minute or two. I was being paranoid enough to make sure I'm touching every Info.plist, including those in the Utilities/ directory, for apps like Terminal and Activity Monitor.

find private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;
find private/var/folders/ -name com.apple.dock.iconcache -exec rm -rf {} \;
rm -rf Library/Caches/com.apple.iconservices.store
touch Applications/*
find Applications/ -name Info.plist -exec touch {} \;
  1. No need to kill Finder or Dock. You just reboot the system (look in top-left Apple logo icon menu for "Restart").
@star-affinity

This comment has been minimized.

star-affinity commented Nov 14, 2017

One year later, but…

@toufikhamdani

Try: touch -f /Applications/Notes.app

or if that doesn't work: sudo touch /Applications/Notes.app

and enter the admin password.

@phoenix-zhu

This comment has been minimized.

phoenix-zhu commented Nov 17, 2017

@frickenate's solution(https://gist.github.com/fabiofl/5873100#gistcomment-2232236) works fine for me, all the icons come back. Thanks, man.

@ggmichaelgo

This comment has been minimized.

ggmichaelgo commented Nov 22, 2017

This works for me

sudo touch /Applications/*.app; sudo touch /Applications/*.app/Contents/Info.plist; killall Dock

@justingoeres

This comment has been minimized.

justingoeres commented Nov 22, 2017

@frickenate's solution above (https://gist.github.com/fabiofl/5873100#gistcomment-2232236) also worked for me, but only for a couple of days :(.

@lwilliamson01

This comment has been minimized.

lwilliamson01 commented Nov 25, 2017

@SteveJobzniak, Thank you so much!

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; killall Dock; killall Finder

@shagamemnon

This comment has been minimized.

shagamemnon commented Dec 1, 2017

New answer that works quick!! From Apple Support:

  1. In Finder > Go to Folder > Enter "Library" > Preferences (see images below if you don't understand this)
  2. Find and remove "com.apple.dock.extra.plist" and "com.apple.dock.plist" then restart.

That's it!

screen shot 2017-11-30 at 4 04 22 pm

screen shot 2017-11-30 at 4 04 40 pm

@MartinsGatavins

This comment has been minimized.

MartinsGatavins commented Dec 1, 2017

Actually @frickenate solution was the only one that worked for me with 10.13.1 otherwise OS did not let me to rm or touch files.

@st8800

This comment has been minimized.

st8800 commented Dec 2, 2017

Man... wasted 1 plus hours of my life trying type all the command lines since the beginning of the thread, which was error proned and didn't work when error free.... while all I had to do was start from the bottom of the thread and follow shagamemnon's solution to delete com.apple.dock.plist and restart. This restored the docked icons. Thanks shagamemnon!

Now to restore the Launchpad icons. Go to terminal and type: rm ~/Library/Application\ Support/Dock/*.db; killall Dock

Presto! All icons restored!

@jonathandalgaard

This comment has been minimized.

jonathandalgaard commented Dec 3, 2017

@frickenate solition was the only one working for me too. THANKS

@thundernixon

This comment has been minimized.

thundernixon commented Dec 3, 2017

ヽ(´▽`)/

@shagamemnon's solution worked for me! I actually only could find and delete com.apple.dock.plist, but after trashing that and doing a simple restart, my icons are back.

ヽ(´▽`)/

@ruimarinho

This comment has been minimized.

ruimarinho commented Dec 5, 2017

@ggmichaelgo's solution worked for me. Now I just need to fix Month 13 is out of bounds... eating all the CPU 🤦‍♂️

@gordonliu

This comment has been minimized.

gordonliu commented Dec 5, 2017

@frickenate your High Sierra solution works for me. Thanks!

@Bradmin82

This comment has been minimized.

Bradmin82 commented Dec 5, 2017

I'm not sure which solution worked for me, but I thought that none of them were working until I gave my mac a restart. Now the icons are back in the Dock and Launchpad!

@olkeene

This comment has been minimized.

olkeene commented Dec 6, 2017

@st8800 you made my day, thanks! The solution works on High Sierra 10.13.1

@rio416

This comment has been minimized.

rio416 commented Dec 7, 2017

@ggmichaelgo 's post worked for me!! I have a 2014 macbook air w/ latest MacOs software FYI and it worked! Thanks! (made an account just to share the news lol)

@eaglejazz

This comment has been minimized.

eaglejazz commented Dec 8, 2017

@frickenate solution was the only one that worked for me with High Sierra [OS did not let me sudo to rm or touch files]... THANKS!

@jaydelrosario

This comment has been minimized.

jaydelrosario commented Dec 8, 2017

Tried everything - nothing works for me :(

image

@jennopolis

This comment has been minimized.

jennopolis commented Dec 9, 2017

Shagamemnon's simple trick worked for me on an iMac running OS 10.13.1! Thank you!

@l-g

This comment has been minimized.

l-g commented Dec 11, 2017

Doesn't @shagamemnon 's solution restore your Dock settings to the default? That is, you have to add/remove what you want in your dock and sort everything again?

@rapkin

This comment has been minimized.

rapkin commented Dec 12, 2017

@jaydelrosario i had the same issue. But in last update (10.13.2 Dec 12, 2017) this problem fixed.

@SmeXhy

This comment has been minimized.

SmeXhy commented Dec 12, 2017

It's weird that it's happening only when I am playing League of Legends. They were kind of useless at the support ticket though.

@jZipfel

This comment has been minimized.

jZipfel commented Dec 15, 2017

I have had this issue since El Capitan, it goes around for a while and then comes back, it's quite annoying... the @frickenate solution works for me in High Sierra but it's not a permanent solution and it's easier to just enter in safe mode (press SHIFT while booting) and then restart than clear all the cached files manually. This are the only two ways that works for me in 10.13.2 MacBook Pro (Retina, 15-inch, Mid 2015). One thing that I noticed is that connecting one or many external monitors, work for a while and then disconnect them seems to trigger the problem almost always.

@liesislukas

This comment has been minimized.

liesislukas commented Dec 17, 2017

@st8800 worked well on High Siera 10.13.2 (17C88) but not sure for how long. Thanks

Apple should fix this :\

@xer0x

This comment has been minimized.

xer0x commented Dec 20, 2017

Thanks @st8800, that was just what I needed to restore my icons.

@lteu

This comment has been minimized.

lteu commented Dec 27, 2017

reply from @shagamemnon +1. Other suggestions are not working for me.

@Lysandroc

This comment has been minimized.

Lysandroc commented Jan 14, 2018

@frickenate thats work for me, thank you!

@rio416

This comment has been minimized.

rio416 commented Jan 25, 2018

@shagamemnon this solution worked after having this problem again, with a newer laptop. However, only one of things in the preferences was there for me and i restarted and it still worked so dont be alarmed if u only see one of those "com.apple." things

@DonRichards

This comment has been minimized.

DonRichards commented Jan 31, 2018

Thanks @frickenate

@Griiid

This comment has been minimized.

Griiid commented Feb 17, 2018

This works for me: sudo touch /Applications/*.app; sudo touch /Applications/*.app/Contents/Info.plist; killall Dock
macOS High Sierra, MacBook Pro (Retina, 13-inch, early 2015)

@franciscogmm

This comment has been minimized.

franciscogmm commented Feb 26, 2018

@Griiid This didn't work for me. :( High Sierra MacBook Pro (15-inch, 2017)

@goridelta

This comment has been minimized.

goridelta commented Mar 8, 2018

Thanks @frickenate and @Niresh12495

After your work IMHO is more easy for me in High Sierra 10.3.3 due to SIP:

reboot in single user recovery mode:

Command + R + S

This open directly the recovery terminal without open the GUI that is much more quickly ;-)

in terminal:

csrutil disable

reboot

in Finder open Terminal and:

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

After some:

/Library/Caches/com.apple.iconservices.store/FAF1E1D8-ADBA-B77E-253D-2897C31FF4D1.isdata
/Library/Caches/com.apple.iconservices.store/1F3D9F08-4C6D-11B7-FF8B-79EAC0B040FD.isdata
/Library/Caches/com.apple.iconservices.store/266D415C-5AA4-8994-E2ED-114D20CB52B4.isdata
...
/Library/Caches/com.apple.iconservices.store/D205AF5B-B969-43A9-580B-8C05E5CEC815.isdata
/Library/Caches/com.apple.iconservices.store/1F8FD1F7-2EA8-4141-F4EC-A5A7B9071CEE.isdata
/Library/Caches/com.apple.iconservices.store/D02EE5D8-1089-8A89-763B-B76B5A02E682.isdata
/Library/Caches/com.apple.iconservices.store
/private/var/folders//b3/q6m4_hbd4sv_24f60z6tfpdr0000gn/C/com.apple.dock.iconcache
/private/var/folders//b3/q6m4_hbd4sv_24f60z6tfpdr0000gn/C/com.apple.iconservices/store.index
/private/var/folders//b3/q6m4_hbd4sv_24f60z6tfpdr0000gn/C/com.apple.iconservices
find: /private/var/folders//b3/q6m4_hbd4sv_24f60z6tfpdr0000gn/C/com.apple.iconservices: No such file or directory
/private/var/folders//zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.iconservices/store.index
/private/var/folders//zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.iconservices
find: /private/var/folders//zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.iconservices: No such file or directory

the Finder reopens with all icons "vaccinated"

If you want to reactivate SIP, the same as the beginning:

reboot in single user recovery mode:

Command + R + S

in terminal:

csrutil enable

reboot

Regards :-)

@iokobi

This comment has been minimized.

iokobi commented Jul 5, 2018

@zigang93

This comment has been minimized.

zigang93 commented Sep 4, 2018

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

after that restart your mac.

wahlaaah.. all restore and back to normal

@mirkogrewing

This comment has been minimized.

mirkogrewing commented Oct 11, 2018

On Mojave, by merely removing "com.apple.dock.plist" in /Library/Preferences I got all icons back (they were missing both in dock and Applications folder). I didn't even need to restart.

@foogaz

This comment has been minimized.

foogaz commented Nov 6, 2018

@zigang93, thanx, its worx (mojave 10.14)

@igrir

This comment has been minimized.

igrir commented Nov 15, 2018

cool trick with touch!

@dahoba

This comment has been minimized.

dahoba commented Dec 4, 2018

Thank you so much. The @zigang93 's command work for me; on Mojave 10.14.1.

Well, after restart the OS I need to manage icons on the Dock again, all reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment