Skip to content

cyphalle/clean-icloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Clean iCloud

🧹 A smart utility script to free up local disk space by removing local copies of your already-synced iCloud files.

What it does

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.

Key Features

  • 🚀 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

Prerequisites

  • macOS with iCloud Drive enabled
  • iCloud Drive synchronization properly configured
  • Files should be fully synced to iCloud before running

Usage

./clear_icloud_local.sh

The script will:

  1. Scan your iCloud Drive directory
  2. Show total number of files to process
  3. Display a progress bar during operation
  4. Provide a summary of successful and failed operations
  5. Show disk space statistics

Output

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.

Important Notes

  • 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

License

MIT License

Author

Created by Cyprien Halle

About

.sh to clean my icloud files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages