Created
December 21, 2021 18:28
-
-
Save insidegui/ca569b701c0cb905f1b72eb1c8a4d541 to your computer and use it in GitHub Desktop.
Remove Xcode app archives from macOS LaunchServices database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
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/