MacOS – The icons do not update in the Finder or Get Info Tab

findericonmacos

I recently changed my text editor default from 'Text Wrangler' to 'Sublime Text' but even then all the default icons for the files types such as .js and .php still show TextWrangler default icon. When I open the files, It opens in Sublime Text correctly.

What can I do to fix all these default icons?

enter image description here

Best Answer

This is for OS X Mavericks.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

Running the above command on Terminal will rebuild the LaunchServices DB, and restarting the Mac works.

Credits for this answer by Mateusz