3

I've read so many answers to this question, but none of them seem to work in the latest Mac OS Ventura 13.1

File icons keep getting the wrong thumbnail. As soon as you install some software that uses the same file associations as previously installed software, all your icons get changed to that new software, without asking.

You can change the file association via GET INFO, but the wrong icon remains. Steps to reproduce:

  • install vs code (JS icons become associated with VS code)
  • install phpstorm (JS icons become associated with phpstorm)
  • GET INFO
  • change file type association back to VS code, apply to all files
  • now the JS file DOES get opened with VS code by default, but the icon remains a phpstorm icon!

Restarting the finder or the whole mac has no effect.

wrongicon

1 Answer 1

0

1. Rebuild the LaunchServices database

Not strictly required, just to be sure it's really up-to-date:

Command for copy & paste into Terminal:

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

Command broken into multiple lines for better readability:

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

This is where file associations are stored (which app shall open a file by default) and where all app registrations for files are stored (which apps shall appear in the Open With menu when you right click a file). Every time you install an app or select a different default app for a file type, this database is updated.

This is a privileged command, only admins can run it and you must type in your password for authorization.

Be patient, this process can take a while and it may hang multiple times for a bit but it will continue, just give it some time.

2. Clear Icon Cache

Only that step is strictly required to fix your issue.

Commands for copy & paste into Terminal:

sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;

sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;

Commands possibly broken into multiple lines for better readability:

sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;

sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;

Based on the LaunchServices database, the system generates those files for quicker access to icons.

Those are a privileged command, only admins can run them and you must type in your password for authorization.

3. Restart Dock and Finder

killall Dock
killall Finder

Once those two processes are back up, you should see the correct icons.

Instead of step 3, you can also just reboot your system or log out and back in your user.

1
  • Thanks for answering, I'm not sure if this is still an issue in Mac OS Sequoia, I haven't run into this issue recently any more. Commented Nov 18 at 10:34

You must log in to answer this question.

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