Last active
June 10, 2019 19:44
-
-
Save nanoxd/755137c70fdf81c32bb88ddebb167876 to your computer and use it in GitHub Desktop.
[Xcode Diet] Clean up after Xcode's voracious hard drive appetite
This file contains 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
#!/usr/bin/env sh | |
set -e | |
fancy_echo() { | |
local fmt="$1"; shift | |
printf "\n$fmt\n" "$@" | |
} | |
fancy_echo "π’ Current Free Space" | |
df -hl | |
fancy_echo "π Deleting unavailable simulators" | |
xcrun simctl delete unavailable | |
fancy_echo "π Deleting Derived Data" | |
rm -rf ~/Library/Developer/Xcode/DerivedData | |
fancy_echo "π Deleting Carthage Caches" | |
rm -rf ~/Library/Caches/{carthage,org.carthage.CarthageKit} | |
fancy_echo "π Free Space" | |
df -hl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment