Skip to content

Instantly share code, notes, and snippets.

@paweldudek
Last active September 23, 2024 12:07
Show Gist options
  • Save paweldudek/2e5b8c5725d5d20e93d35e6eb1921ab5 to your computer and use it in GitHub Desktop.
Save paweldudek/2e5b8c5725d5d20e93d35e6eb1921ab5 to your computer and use it in GitHub Desktop.
Cleaning Launch Services

How to clean Launch Services Register

First, try to clean the register for user by running this in Terminal.app:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -v -apps u

That should do the trick. If it doesn’t, then widen the domains with

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -v -apps u,s,l

and finally try

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -v -all u,s,l

which should wipe everything from the database.

It is also not impossible that you find you have to use the older syntax with

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -v -domain u

Source: https://eclecticlight.co/2017/08/11/launch-services-database-problems-correcting-and-rebuilding/

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