Skip to content

Instantly share code, notes, and snippets.

@insidegui
Created December 21, 2021 18:28
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save insidegui/ca569b701c0cb905f1b72eb1c8a4d541 to your computer and use it in GitHub Desktop.
Save insidegui/ca569b701c0cb905f1b72eb1c8a4d541 to your computer and use it in GitHub Desktop.
Remove Xcode app archives from macOS LaunchServices database
#!/bin/bash
# Recursivelly removes all apps from your Xcode archives from the LaunchServices database, preventing them from being used for widgets, launch at login, etc.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -R -f -u $HOME/Library/Developer/Xcode/Archives
@insidegui
Copy link
Author

insidegui commented Dec 21, 2021

NOTE: May take a while to run if you have lots of Xcode archives

Learn more: https://eclecticlight.co/2019/03/25/lsregister-a-valuable-undocumented-command-for-launchservices/

@fblondiau
Copy link

Thanks for this, Guilherme ! So useful. I just had to double quote $HOME to avoid word splitting, as my home is not in a standard location.

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