Removing Duplicate Dictionaries from Script Editor

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.

3 thoughts on “Removing Duplicate Dictionaries from Script Editor

  1. Thanks for the tip. It looks like the LaunchServices Framework has moved to the CoreServices framework in Leopard. The correct command to rebuilt the index on Leopard is:

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

  2. Thanks so much for this helpful tip and comment! Sometimes these things are hard to find, even with Google, since some knowledge about the problem and/or its causes is required to even write a good query. This post got me the answer reasonably quickly, and it worked perfectly.

  3. Thanks – still useful after all these years.

    As of OS X 10.8.3, the revised command provided by Ian still works:

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

Leave a Reply

Your email address will not be published. Required fields are marked *