macOS Disk Cleanup
Overview
Generate a fast disk-usage report, identify the biggest culprits, and carry out targeted cleanup in a safe, reversible way (move to Trash) with clear user confirmation.
Quick Start
- •Run
scripts/scan_disk_usage.shto gather a summary. - •Summarize largest directories and propose a cleanup plan.
- •Execute cleanup with
scripts/cleanup_targets.sh ... --applyafter user confirmation. - •Re-check space with
df -h /System/Volumes/Dataand remind to empty Trash.
Workflow
- •
Baseline scan
- •
scripts/scan_disk_usage.sh - •Note the top-level
~/Librarysections, plus any large files outside Library.
- •
- •
Plan + confirm
- •Call out high-impact targets and any app/data impact.
- •Ask for confirmation before cleanup; do not empty Trash unless explicitly requested.
- •
Prepare
- •Quit related apps if requested (
--quit-appsflag).
- •Quit related apps if requested (
- •
Clean up
- •Use
scripts/cleanup_targets.shwith the selected flags and--apply.
- •Use
- •
Verify + wrap up
- •Re-run
df -h /System/Volumes/Data. - •Note Trash size and remind to empty Trash to reclaim space.
- •Re-run
Targets Cheat Sheet (Common Safe Wins)
- •Xcode + Simulators
- •
~/Library/Developer/XCTestDevices - •
~/Library/Developer/CoreSimulator/Devices - •
~/Library/Developer/Xcode/iOS DeviceSupport - •
~/Library/Developer/Xcode/UserData/Previews - •
~/Library/Developer/Xcode/DerivedData
- •
- •Claude
- •
~/Library/Application Support/Claude/vm_bundles
- •
- •Podcasts
- •
~/Library/Containers/com.apple.podcasts/Data/tmp - •
~/Library/Group Containers/243LU875E5.groups.com.apple.podcasts/Library/Cache
- •
- •Prime Video
- •
~/Library/Containers/com.amazon.aiv.AIVApp/Data/Library/com.apple.UserManagedAssets*
- •
- •Brave (cache only)
- •
~/Library/Application Support/BraveSoftware/Brave-Browser/Default/Service Worker - •
~/Library/Application Support/BraveSoftware/Brave-Browser/Default/Cache - •
~/Library/Application Support/BraveSoftware/Brave-Browser/Default/Code Cache - •
~/Library/Application Support/BraveSoftware/Brave-Browser/Default/GPUCache - •
~/Library/Application Support/BraveSoftware/Brave-Browser/ShaderCache - •
~/Library/Application Support/BraveSoftware/Brave-Browser/GrShaderCache - •
~/Library/Application Support/BraveSoftware/Brave-Browser/component_crx_cache
- •
Scripts
- •
scripts/scan_disk_usage.sh: fast usage snapshot for common macOS locations. - •
scripts/cleanup_targets.sh: curated cleanup withtrash, supporting flags:- •
--xcode,--claude-vm,--podcasts,--prime-video,--brave-cache,--all - •
--applyto perform cleanup (default is dry run) - •
--quit-appsto stop related apps first
- •