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


3 Answers 3


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, 2014 at 8:56

In the terminal, paste the following code and hit Enter:

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

Reference: Clear the icon cache on a Mac when you start seeing generic icons in Finder or the Dock


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