29
Jul
07

Rebuild the “LaunchServices database”.

Execute this command to solve a hosed LaunchServices database:
/System/Library/Frameworks/ApplicationServices.framework\
/Frameworks/LaunchServices.framework/Support/lsregister \
-kill -r -domain local -domain system -domain user

Just calling lsregister by itself will show some explanation:

lsregister: [OPTIONS] [-domain { system | local | user | network }]... [path]...
Search the paths for application bundles and add each found item to the Launch
Services database.  For domain specifications, ask CF for the list of application
locations in the given domain(s).
-kill     Reset the global Launch Services database before doing anything else
-lint     Print information about plist errors while registering bundles
-convert  Register apps found in older LS database files
-load     Load the LaunchServices service plugin if it's not already loaded.
-lazy n   Sleep for n seconds before registering apps if the local cache is aleady populated.
-r        Recursively register directory contents, do not recurse into packages or invisible directories.
-R        Recursively register directory contents, including the contents of packages and invisible directories.
-f        force-update registration info even if mod date is unchanged
-v        Display progress information.   -dump     Display full database contents after registration.
-h        Display this help.


Source: Mac OsX Hints


3 Responses to “Rebuild the “LaunchServices database”.”


  1. 1 Susana L Aug 8th, 2007 at 1:14 am

    Hi there, I’ve been using Macs for over a year now (not very proficient tho) and it’s the first time this is happening. The applications appear duplicated on the ‘open with’ menu, I’ve tried to ‘run’ this command you’ve suggested but nothing happened. How do I run commands in Mac? So sorry, it may sound stupid but it’s the only way to learn..

    thanks a lot for your time..

    Sus.

  2. 2 JeBeKe Aug 8th, 2007 at 1:23 am

    @Sus: You just open up the terminal and copy paste the 3 lines in the terminal. Don’t mind about the ‘>’ you will see at the beginning of lines 2 and 3 after pasting in the terminal. Just hit the return key after having pasted the 3 lines.

  3. 3 Susana L Aug 8th, 2007 at 2:01 am

    THANKS!!!! It took me 2 minutes to figure out “HOW” to do it but it worked!!! NO more that huge list of nonsense.
    THANKS again! Have a lovely day =)

    Sus.

Leave a Reply




Pages

 

July 2007
M T W T F S S
« Jun   Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Flickr

SelienSelienSelienSelienSelienSelienSelienSelienSelienSelienSelienSelien