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


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


You may get some mileage out of the following article:


In that Info screen, click the Wrangler icon at the top of the page and then command+x to cut the incorrect icon. That should restore the 'default' image, which is now Sublime Text.

  • The command + x does not cut the icon, although I was able to paste another one but still it only worked for that one file – Jash Jacob Oct 3 '14 at 8:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .