Last active
January 17, 2023 13:56
-
-
Save brunogama/dd61460cde4da5cd4dc79c94997a87b1 to your computer and use it in GitHub Desktop.
XCInstall cleaner
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 | |
FIRST_APP_ON_XC_INSTALL=$(find ~/Library/Developer/Xcode/DerivedData \ | |
-path "*/Build/Products/*/.XCInstall/*.app" \ | |
-type d \ | |
-maxdepth 6 \ | |
-print \ | |
-quit \ | |
-exec dirname {} \;) | |
CLEAN=${FIRST_APP_ON_XC_INSTALL%/*} | |
DU_RESULT=$(du -sh "$CLEAN" | cut -f 1) | |
echo "Deleting $CLEAN" | |
rm -rf "$CLEAN" | |
echo "Released .XCInstall $DU_RESULT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment