← ClaudeAtlas

system-cleanuplisted

Use when a Linux disk is filling up or the user asks to free space / clean the system / "系统盘满了" / move large files off the system disk. Diagnose where the space went (df / du / dpkg / snap / docker), then give a prioritized, risk-tagged plan — do safe user-level deletions, and LIST the sudo items for the user to run (default to advise-then-confirm; this kind of box often has no passwordless sudo, so use pkexec or hand over the commands). Covers the VS Code WebStorage PDF-cache bloat bug, old-kernel pile-up, snap/journal/apt/docker caches, and NTFS data-disk write failures.
jajupmochi/claude-config · ★ 0 · Data & Documents · score 72
Install: claude install-skill jajupmochi/claude-config
# /system-cleanup **Diagnose → report (prioritized + risk-tagged) → let the user run anything destructive or sudo.** Default posture is *advise, don't auto-delete* unless the user says go. Never delete something you didn't identify; never assume passwordless sudo. ## Master TOC - [When to use](#when-to-use) - [Step 1 — diagnose where the space went](#step-1--diagnose-where-the-space-went) - [Step 2 — the usual suspects](#step-2--the-usual-suspects) - [Step 3 — safe cleanup (no sudo)](#step-3--safe-cleanup-no-sudo) - [Step 4 — sudo cleanup (hand to the user)](#step-4--sudo-cleanup-hand-to-the-user) - [Special: VS Code WebStorage bloat (the 31 GB trap)](#special-vs-code-webstorage-bloat-the-31-gb-trap) - [Special: NTFS data disk won't write / mount](#special-ntfs-data-disk-wont-write--mount) - [A phased interactive script](#a-phased-interactive-script) - [Cautions](#cautions) ## When to use `df` shows the system/root disk past ~85%; the user says space is low, wants to know what to delete / move, or a second disk won't accept writes. Trigger on `/system-cleanup` or auto when the user describes a full disk. ## Step 1 — diagnose where the space went Read-only. Run these first and report the picture before touching anything: ```bash df -h / # how full is the system disk du -h --max-depth=1 ~ 2>/dev/null | sort -hr | head -20 # biggest things in $HOME sudo du -h --max-depth=1 / 2>/dev/null | sort -hr | head -20 # biggest top-le