How to tame OS X's Launch Services

Mac OS X
Clear the clutter from your Open With pop-up for a little judicious housekeeping

How many times a day do you double-click on files in order to open them and launch the application that created them? 10? 20? Maybe even 50?

It might even be more, depending on what you use your Mac for, your preferred way of working, and a whole load of other imponderables. However many times you or I do it, though, it's an action that becomes almost like breathing: we take it for granted it'll work, so much so that we almost don't notice we're doing it.

Sometimes, you might want to open a file in an application other than the default, in which case you can either open the application first and go to File > Open…, or right-click (or [Ctrl]-click) the file and choose Open With. If you do the latter, you'll see the default application at the top of the list (with the word 'default' next to it in parentheses), followed by a list of other applications you can use to open the file.

Finally, sometimes when you open up an Info box you might find the Open With pop-up festooned with multiple versions of applications (Preview, for instance), or even applications that are no longer installed. In this case, in order to restore some order to the list, not to mention your sanity, you can rebuild the Launch Services Database. To do this, launch Terminal (from Applications > Utilities), then type: