How can I modify the list of Applications under 'Open With...'? I recently went to open an audio file, and wanted to open it in an editor instead of a player. I right-clicked it, hovered over 'Open With...' and was met with a very unsightly list.



I have seen a problem in the past where apps will have previous versions stuck in the /Applications folder with their version number appended, but that is not the case here. Despite the duplicity in this list, no app is duplicated in /Applications nor anywhere else I can find on my system.

What causes this list to become filled with duplicates, and how can I remove them and ensure only the latest (and functional) version is list?
Applications don't have to live in /Applications. If you have a clone of your system mounted, that can account for some duplicates, but certainly not what you are observing. The list of programs for Open with… is maintained in the Launch Services database. If the list contains many duplicates as yours does, the database looks like it needs rebuilding.

Macworld Hints offers a suggestion as to how you can fix this:

The lsregister command, found at System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister, can tell the database to reset. Macworld recommends running the command thusly: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

Note that utilities like Onyx or Cocktail can also reset this database for you. Do note that Finder won't re-read the new database so you will either have to log out and in again or issue a killall Finder if you don't mind just killing it for any users on your Mac to avoid a log out and in.