← ClaudeAtlas

disk-cleanuplisted

Analyze disk usage and clean package and container caches on an Arch Linux workstation. Use when the user mentions disk space, storage, cleanup, or that a drive is full.
matthull/my-skills · ★ 0 · AI & Automation · score 72
Install: claude install-skill matthull/my-skills
# /disk-cleanup Analyze disk usage and clean package/container caches on an Arch Linux workstation. **Trigger:** User mentions disk space, storage, cleanup, or "drive is full." ## Analysis Phase Run these commands to build a usage picture. Start broad, drill into the big items. ### 1. Overall State ```bash df -h / ``` ### 2. Top-Level Scan Measure `/home/<user>/*` and `/home/<user>/.*` (hidden dirs) separately: ```bash du -sh /home/<user>/* 2>/dev/null > /tmp/du-home.txt sort -rh /tmp/du-home.txt > /tmp/du-home-sorted.txt du -sh /home/<user>/.* 2>/dev/null > /tmp/du-hidden.txt sort -rh /tmp/du-hidden.txt > /tmp/du-hidden-sorted.txt ``` Then read the sorted files. The usual suspects for hidden dirs: - `~/.cache` (yay, pip, uv, yarn, npm, Cypress, Playwright, puppeteer, huggingface, browsers) - `~/.local/share` (Steam, vosk, waydroid, whisper models, flatpak) - `~/.npm`, `~/.gradle`, `~/.gem`, `~/.nvm`, `~/.rustup`, `~/.cargo` ### 3. Docker ```bash docker system df # Summary: images, containers, volumes, build cache docker system df -v # Verbose: per-image and per-volume breakdown ``` Check for orphaned worktree Docker environments — containers/volumes from worktrees that no longer exist. Compare `docker ps -a --format "{{.Names}}"` against `git worktree list`. ### 4. System Caches ```bash du -sh /var/cache/pacman 2>/dev/null # pacman package cache du -sh /var/log 2>/dev/null # system logs du -sh /opt 2>/dev/null # optional