29 points · by Deszip · 2y ago · 15 comments
During last time we (me and my friend) were building an app to clean various stuff after Xcode. I was fed up as a developer that Apple related things load my drive and I need hundreds of gigabytes just to do my job.
It's live now on Mac App Store and we'll be glad to hear your feedback: https://apps.apple.com/ua/app/cleano/id6469460523
Features
- Simulators cleanup. It's a correct cleanup via 'simctl' so you even don't need to restart Xcode for it to take effect - SPM repos cache. Swift PM stores github repos for packages separately and never removes them unless you ask it via cli. - Derived Data, a first thing you try to fix weird Xcode linking issues :)
Some features currently in development: - Desktop widget, so you can delete derived data with a single mouse click - Support for more package managers like CocoaPods; they also have substantial caches that appear to be ignored
Links
We also have a separate GitHub repo (we're developers, right?) to track issues and feature requests: https://deszip.github.io/Cleaner-Tracker/
-- edit -- Ouch, I hate the dark patterns to sell this subscription. Just put a price to download then...
One note, I am on 14.5. I just downloaded, then had a screen asking me to give permission my Developer Library folder. I granded/added access, and the app crashed on me. It seems to persistently crash when I try to re-open now as well.
omnidisksweeper is free
And $50 to clean up some random files? No thanks. We used to pay half of that for full software suites, audio editors, etc and a lot of companies had healthy businesses selling perpetual licenses.
There is nothing new under the sun on Mac.
#!/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!" xcrun simctl shutdown all && xcrun simctl erase all