Rebuild launchservices db to fix minor bugs 0


Rebuild launchservices db to fix minor bugs


Every so often your Mac will have generate minor problems. For instance it may replace a file type icon with a different icon, it may also get confused with your open with, right click menu. This is mostly due to your Mac writing over file with wrong information or the same information twice. This is kind of annoying, but it can easily be rectified. The most common method, and the one explain in this post, is to rebuild the launchservices database. This takes a Terminal command (like most commands), to clear the database and rebuild it with the correct information.

As always, open up Terminal and copy and paste the following. This line of code works for Leopard (Mac OS X 10.5) only, if you are on an older version please use the second command.

Leopard Only:

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

Tiger and Older:

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

The only difference between the commands it the location of lsregister. This is your launch services database.

Re-building your database will take a couple of seconds depending on how quick your Mac is. If everything goes to plan you open with menu should be back to normal and the correct icons should be present with your file types. If the same problem persists it may be a bigger problem.

If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips