For a few months, I’ve had a number of duplicate dictionaries listed in the Open Dictionary dialog box of Apple’s Script Editor. (This application is used to write and debug AppleScript code — the Mac equivalent to batch files or shell scripts.) While this wasn’t really hurting anything, it was kind of annoying to have the same program show up five or six times, typically after I upgraded the offending apps to newer versions. Since I had trouble with a Google search for "Script Editor" "duplicate dictionaries", I thought I’d share the solution I eventually found.
The solution turns out to be forcing Launch Services to rebuild its database. The database maps file types to applications that are supposed to open them, but sometimes it gets confused and can hang on to old versions of the same program. The magic incantation, according to macosxhints.com, is:
/System/Library/Frameworks/ApplicationServices.framework/ Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
Thanks to this post at Apple Discussions for pointing me in the right direction.