🧹 A smart utility script to free up local disk space by removing local copies of your already-synced iCloud files.
This script helps you reclaim valuable disk space by removing local copies of files that are already safely stored in iCloud. It uses Apple's brctl (Birth Registration Control) utility to "evict" local copies while keeping your files securely in iCloud.
- 🚀 Batch processes all files in your iCloud Drive
- 📊 Shows real-time progress with a progress bar
- 📝 Logs any failed operations for review
- 💾 Preserves all your files in iCloud
- 📈 Shows disk space statistics after completion
- macOS with iCloud Drive enabled
- iCloud Drive synchronization properly configured
- Files should be fully synced to iCloud before running
./clear_icloud_local.shThe script will:
- Scan your iCloud Drive directory
- Show total number of files to process
- Display a progress bar during operation
- Provide a summary of successful and failed operations
- Show disk space statistics
You'll see:
- Real-time progress bar
- Final summary with:
- Total files processed
- Successfully evicted files
- Failed operations
- Current disk space usage
Failed operations are logged to ~/icloud_evict_failed.log for review.
- Files remain safely in iCloud and can be re-downloaded when needed
- Failed evictions usually indicate files that are:
- Currently in use
- Being synchronized
- Not yet fully uploaded to iCloud
- System might take a few moments to show the freed space
- You might need to restart Finder to see updated disk space
MIT License
Created by Cyprien Halle