xcode-cleanup
v1.0.1
Published
CLI tool to automatically clean Xcode derived data with scheduled cleanup
Maintainers
Readme
xcode-cleanup
A simple CLI tool to automatically clean Xcode derived data with scheduled cleanup support.
Installation
npm install -g xcode-cleanupOr use directly with npx:
npx xcode-cleanup <command>Commands
init
Set up automated scheduled cleanup of Xcode derived data. This will guide you through an interactive prompt to choose:
- Frequency: Daily, Weekly, or Monthly
- Day: Which day (for weekly/monthly schedules)
- Hour: What time (24-hour format)
After selecting your preferences, you can choose to:
- Add the command to crontab manually
- Create a launchd plist file (macOS recommended)
- Skip automated setup
xcode-cleanup initremove
Immediately remove all Xcode derived data from ~/Library/Developer/Xcode/DerivedData.
xcode-cleanup removeHow it works
The init command creates a schedule configuration saved to ~/.xcode-cleanup-schedule.json. You can then set up automation using either:
- Crontab: Traditional Unix scheduling
- Launchd (macOS): Native macOS scheduling with plist files
Examples
# Set up daily cleanup at 2 AM
xcode-cleanup init
# Clean derived data immediately
xcode-cleanup removeDevelopment
# Install dependencies
npm install
# Run locally
node src/index.js --help