Skip to content

Implement incremental cleanup with target #24

@SH20RAJ

Description

@SH20RAJ

🎯 Goal

Allow users to specify a target amount of space to free, stopping early when reached.

🚀 Features

cleanmac --incremental --target 10GB
cleanmac --target 5GB --preset web-dev

📊 Example Output

🎯 TARGET: Free 10GB of space

Strategy:
1. Start with safest categories
2. Stop when target is reached
3. Save aggressive cleanups for later

Cleaning:
✅ Package manager caches      3.5GB freed   (Total: 3.5GB)
✅ Homebrew cache              1.8GB freed   (Total: 5.3GB)
✅ Old project folders         4.9GB freed   (Total: 10.2GB)

🎉 Target reached! Freed 10.2GB
   Stopped early - saved time by skipping 5 categories

🔧 Implementation Details

  • Parse target size
  • Track cumulative freed space
  • Stop when target is reached
  • Prioritize by safety level
  • Report what was skipped

✅ Acceptance Criteria

  • Stops at target accurately
  • Prioritizes safe categories first
  • Reports what was skipped
  • Saves time vs full cleanup

🔗 Related

Part of Phase 5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions