Package caches
uv, pip, npm, Yarn, pnpm, Homebrew and Go caches, through each tool's own clean command.
cachesSpaceKeeper removes data that rebuilds itself, optimises your screenshots and recordings, and cleans at once when free space runs low.
For developers on macOS. Runs locally; the engine is one zsh script with no dependencies.
Only data that rebuilds itself. Each module uses the tool's own clean command where there is one, and every module has a dry run.
uv, pip, npm, Yarn, pnpm, Homebrew and Go caches, through each tool's own clean command.
cachesDerivedData folders that have not been written in the last 2 hours.
derived-dataErases the data of shut-down simulators over 200 MB. Booted simulators are never erased.
simulatorsGit-ignored build/, .build/, out/, DerivedData and test_output folders in your code folder.
build-dirsRemoves clean, fully merged Git worktrees after three hours without a HEAD change. Branches and release worktrees are kept.
worktreesBuild cache, stopped containers and unused images. Volumes are never pruned.
docker~/.gradle/caches, only in an emergency pass, when free space is already low.
gradleShuts down booted simulators that no process is using and that have had no writes for 30 minutes.
sim-shutdownThese rules hold for every pass. No flag relaxes them.
*-release worktreesA launchd agent runs a cleanup pass every 10 minutes. It also checks free space every 2 minutes, and when it drops below 15 GB it runs an emergency pass straight away, which adds the Gradle cache.
You don't have to remember to clean, and a long UI test run or Docker build is caught within minutes of free space running low.
LOW_GIB=15 # emergency pass below this
INTERVAL=600 # seconds between passes
CHECK=120 # seconds between checks
IDLE_MIN=120 # never touch recent writes
CODE_DIR="$HOME/code"
AUTO_SIM_SHUTDOWN=0
SIM_IDLE_MIN=30
SpaceKeeper uses Clop to optimise images and videos. Setup installs Clop if it's missing and points it at your media folders, so new captures are optimised as they arrive.
Run spacekeeper media to optimise what is already there, or pass your own paths.
All three call the same engine and show its output. None of them has its own cleanup logic.
Run spacekeeper for a dashboard in the terminal, or use the commands directly. Every command has --json.
spacekeeper status
spacekeeper clean --dry-run
spacekeeper sims shutdown-idle
Free space in the menu bar, with a window for cleaning, simulators, media and the log.
Disk Status in the menu bar, Clean Disk with a dry run, Simulators, and Optimise Media.
Download SpaceKeeper for Mac directly from Piper, or install the Mac App Store edition once it is live. Unzip the direct build and move it to Applications.
The direct Mac app includes the cleanup engine, background guard and Clop integration. Start with a dry run to inspect what a cleanup would remove.
Builds and UI tests are what refill the disk. Paste these rules into an app repository's AGENTS.md so builds clean up after themselves.
.xcresult bundles, then delete the bundles.build/<name> and delete it when the run ends, unless you opt in to keep it.