4 ms·
Or just run this; #!/bin/bash # Script used to create a pristine working directory for a clean build. set -euo pipefail script_path=$(cd "$(dirname
by AJRF 2y ago
Or just run this;
#!/bin/bash
# Script used to create a pristine working directory for a clean build.
set -euo pipefail
script_path=$(cd "$(dirname "$BASH_SOURCE")" &> /dev/null && pwd)
base_dir_path=$(realpath "$script_path"/..)
echo "Remove DerivedData"
if [ -d "${base_dir_path}/DerivedData" ]; then
rm -rf "${base_dir_path}/DerivedData/*"
else
sudo rm -rf ~/Library/Developer/Xcode/DerivedData/*;
fi
echo "Reset packages cache"
rm -rf ~/Library/Caches/org.swift.swiftpm/repositories
rm -rf ~/Library/Caches/com.apple.dt.\*
rm -rf ~/Library/org.swift.swiftpm
echo "# Done!"
- mrbombastic 2y agoMight be missing it but this doesn’t delete old sims or device files which in my experience is worst offender for taking up space by Xcode. But agree with sentiment that a paid app is overkill
- AJRF 2y agoAdd xcrun simctl shutdown all && xcrun simctl erase all
- deleted 2y ago[deleted]