Skip to main content

free-disk-space

Reclaim disk space on macOS by auditing and clearing build artifacts, package-manager caches, stale git worktrees, and offloading large media to an external drive. Use whenever the user complains about low storage, a full disk, "out of space" errors, or asks to clean up, offload, or free up their machine — even if they don't name specific folders.

설치로 이동

소스 정보

저장소
bholmesdev/skills
최근 소스 활동
2026년 7월 29일 14:40
감지된 SKILL.md 언어
영어
스타
175
포크
3

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
free-disk-space
description
Reclaim disk space on macOS by auditing and clearing build artifacts, package-manager caches, stale git worktrees, and offloading large media to an external drive. Use whenever the user complains about low storage, a full disk, "out of space" errors, or asks to clean up, offload, or free up their machine — even if they don't name specific folders.
# Free Disk Space (macOS) Audit the disk, clear what's safely regenerable, and confirm before touching anything that isn't. ## Ground rules - Use `trash` (if the CLI is available) instead of `rm -rf`. Accumulate in Trash; ask the user to empty it once at the end. - Prefer a tool's own cleanup command over deleting its directories (`go clean -cache`, `brew cleanup --prune=all`, `pnpm store prune`, `npm cache clean --force`, `cargo clean`). - Measure with `df -h /System/Volumes/Data` (not plain `df /`). - **Do not clear GUI app data.** `~/Library/Caches/<App>` and `~/Library/Application Support/<App>` often hold logins, cookies, and history. Leave them alone unless the user names a specific app and accepts the risk. Prefer build cleanup, package-manager prune, stale worktrees, and external-drive offload instead. ## Workflow ### 1. Assess `df -h /System/Volumes/Data; ls /Volumes`. Note free space and whether an external drive is mounted. ### 2. Survey Targeted `du -sh ... | sort -hr` — not a full scan of `~`. Usual big ones: - **Build artifacts**: `target/` (every worktree too), `node_modules/`, Xcode DerivedData - **Package-manager caches**: go-build, Homebrew, pnpm/npm/pip stores — clean via CLI - **Large media**: CapCut, Screen Studio, Movies, Downloads - Report app caches / Application Support sizes only; don't auto-delete them ### 3. Clear safe tier without asking Build artifacts and package-manager / language-tool caches only. Everything else (app data, media, model weights, toolchains): summarize sizes and ask, or propose offload. ### 4. Audit git worktrees For each worktree: dirty? unique/unpushed commits? Clean + fully merged/pushed → `git worktree remove` and `git branch -d` (never `-D`). Keep and report anything dirty or ahead. ### 5. Offload keepers `rsync -a` → verify sizes → trash original → symlink old path. Symlink individual folders, not whole special dirs like `~/Movies`. Warn the app needs the drive mounted. ### 6. Wrap up What freed immediately, what's in Trash, what you left alone. Ask user to empty Trash and re-check `df`.
GitHub에서 보기