Skip to content

Instantly share code, notes, and snippets.

@Machx
Created April 21, 2011 21:45
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Machx/935558 to your computer and use it in GitHub Desktop.
Save Machx/935558 to your computer and use it in GitHub Desktop.
Rebuild Launch Services on Mac OS X
samurai% /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
@haikusw
Copy link

haikusw commented Apr 21, 2011

on 10.6.6 I don't see the -domain command line option and domains are just separated by commas... ???

lsregister: [OPTIONS] [ ... ]
[ -apps [,domain]... ]
[ -libs [,domain]... ]
[ -all [,domain]... ]

Paths are searched for applications to register with the Launch Service database.
Valid domains are "system", "local", "network" and "user". Domains can also
be specified using only the first letter.

-kill Reset the Launch Services database before doing anything else
-seed If database isn't seeded, scan default locations for applications and libraries to register
-lint Print information about plist errors while registering bundles
-convert Register apps found in older LS database files
-lazy n Sleep for n seconds before registering/scanning
-r Recursive directory scan, do not recurse into packages or invisible directories
-R Recursive directory scan, descending into packages and invisible directories
-f force-update registration even if mod date is unchanged
-u unregister instead of register
-v Display progress information
-dump Display full database contents after registration
-h Display this help

@Machx
Copy link
Author

Machx commented Apr 22, 2011

I got this from somewhere else in a google search, it seems to have worked is all i know

@jonsterling
Copy link

This command is THE JESUS. It fixed all of the ridiculous suggestions in the "Open With" menu.

@Machx
Copy link
Author

Machx commented Apr 22, 2011

@johnsterling that's actually why I looked it up and saved it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment