Get the FREE Ultimate OpenClaw Setup Guide →

macbroom

npx machina-cli add skill lu-zhengda/macos-toolkit/macbroom --openclaw
Files (1)
SKILL.md
5.3 KB

macbroom — macOS Cleanup Tool

Scan for reclaimable disk space:

!macbroom scan 2>&1 || echo "macbroom not installed — brew install lu-zhengda/tap/macbroom"

Analyze the scan results above. Present a summary of reclaimable space by category. Then ask which categories to clean, or if the user wants to clean all. Use macbroom clean --dry-run first to preview, then macbroom clean to execute.

Commands

CommandPurposeExample
macbroom scanScan for reclaimable spacemacbroom scan
macbroom scan --<category>Scan specific categorymacbroom scan --xcode --docker
macbroom scan --threshold NOnly show items above size thresholdmacbroom scan --threshold 100M
macbroom cleanClean scanned junk filesmacbroom clean --dry-run
macbroom clean --permanentDelete permanently (skip Trash)macbroom clean --permanent -y
macbroom uninstall <app>Fully uninstall app + related filesmacbroom uninstall Slack
macbroom maintainRun system maintenance tasksmacbroom maintain
macbroom spacelens [path]Visualize disk space usagemacbroom spacelens ~ --depth 3
macbroom spacelens -iInteractive disk space explorermacbroom spacelens -i
macbroom dupes [dirs...]Find duplicate filesmacbroom dupes ~/Documents
macbroom statsShow cleanup historymacbroom stats
macbroom reportCleanup history reportmacbroom report
macbroom watchMonitor free disk spacemacbroom watch --free 10G
macbroom schedule enableEnable scheduled cleaningmacbroom schedule enable
macbroom schedule disableDisable scheduled cleaningmacbroom schedule disable
macbroom schedule statusShow schedule statusmacbroom schedule status
macbroom trendsStorage usage trends from snapshotsmacbroom trends --last 30d
macbroom trends --forecastPredict when disk will fill upmacbroom trends --forecast
macbroom trends recordCapture storage snapshot (for lanchr agent)macbroom trends record

Storage Trends

Track storage usage over time and forecast disk capacity:

# View storage usage trends
macbroom trends

# Filter to last 30 days
macbroom trends --last 30d

# Predict when disk will fill up
macbroom trends --forecast

# Capture a storage snapshot (for periodic recording via lanchr agent)
macbroom trends record

# JSON output for scripting
macbroom trends --json

Combine with lanchr create --template monitor-disk to automatically record storage snapshots and alert on predicted disk full dates.

Size Filtering

Filter scan results to only show items above a threshold:

# Only items larger than 100 MB
macbroom scan --threshold 100M

# Combine with category
macbroom scan --docker --threshold 500M

Disk Space Monitoring

Watch free disk space and alert when it drops below a threshold:

# Alert when free space drops below 10 GB
macbroom watch --free 10G

Combine with lanchr create --template monitor-disk for persistent disk monitoring.

Cleanup Reports

View cleanup history and trends:

macbroom report

Shows total space reclaimed, cleanup frequency, and category breakdown over time.

JSON Output

Add --json to any read command for machine-readable output:

macbroom scan --json
macbroom dupes ~/Documents --json
macbroom stats --json
macbroom spacelens ~ --json
macbroom report --json
macbroom trends --json
macbroom trends --forecast --json

Scanner Categories

Use category flags with scan or clean:

FlagWhat it scans
--systemSystem caches, logs, temp files
--browserBrowser caches and data
--xcodeDerived data, archives, simulators
--largeLarge files (configurable threshold)
--dockerDocker images, containers, volumes
--nodenode_modules, npm/yarn cache
--homebrewHomebrew cache, old versions
--simulatoriOS Simulator data
--pythonpip cache, pycache, venvs
--rustCargo cache, target directories
--goGo module cache, build cache
--jetbrainsJetBrains IDE caches and logs

No flags = scan all categories.

Safety Guidelines

  • Always scan before clean: macbroom scan first to review what will be removed
  • Use --dry-run: macbroom clean --dry-run shows what would be deleted without deleting
  • Default goes to Trash: Files go to Trash unless --permanent is specified
  • Backup important data: Especially before uninstall or dupes cleanup

TUI Mode

Launch macbroom without arguments for interactive cleanup with category selection and preview.

Source

git clone https://github.com/lu-zhengda/macos-toolkit/blob/main/skills/macbroom/SKILL.mdView on GitHub

Overview

macbroom is a macOS cleanup tool that scans for reclaimable disk space and categorizes the results. It helps you decide what to clean, visualize disk usage, monitor free space, and run scheduled cleanup, maintenance, or uninstalls.

How This Skill Works

macbroom runs a scan to identify reclaimable space across categories (caches, node_modules, Docker, Xcode caches, etc.). It presents a category breakdown and supports a dry-run with macbroom clean --dry-run before executing macbroom clean; it also provides visualization, trends, and monitoring commands like spacelens, trends, and watch.

When to Use It

  • User asks to free disk space or reclaim junk files on macOS
  • Need to remove caches (Xcode, Docker, system caches) or uninstall apps completely
  • Want to visualize disk usage or track storage trends over time
  • Need to find large files or duplicates
  • Plan to enable scheduled cleanup or monitor free space and alerts

Quick Start

  1. Step 1: Run a full scan: macbroom scan
  2. Step 2: Preview cleanup: macbroom clean --dry-run
  3. Step 3: Clean: macbroom clean

Best Practices

  • Run a dry-run first with macbroom clean --dry-run
  • Filter by size thresholds to target large items using macbroom scan --threshold N
  • Use spacelens to visualize before cleaning
  • Review the cleanup report to understand reclaimed space
  • Set up a schedule and alerts with macbroom schedule and watch

Example Use Cases

  • Scan and dry-run clean of reclaimable space in categories such as Xcode caches and node_modules
  • Visualize disk usage with macbroom spacelens and identify top offenders
  • Find duplicates with macbroom dupes and remove redundant files
  • Fully uninstall an app (macbroom uninstall Slack) to remove related files
  • Forecast storage growth with macbroom trends --forecast and plan cleanup

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers