Disk Cleanup
Check disk space usage and identify files that can be safely deleted to free up space.
When to Use This Skill
Use this skill when the user:
- Says their disk is full or running out of space
- Asks to clean up or free up disk space
- Wants to know what's taking up space on their drive
- Says "c盘不够用了", "磁盘满了", "清理磁盘", "disk full", "disk cleanup"
How It Works
Step 1: Check Overall Disk Usage
df -h /c/
Report the total size, used space, available space, and usage percentage.
Step 2: Scan Common Space-Consuming Directories
Check these directories in parallel (use the Bash tool):
User caches and temps:
AppData/Local/Temp— temporary filesAppData/Local/npm-cache— npm cacheAppData/Local/pip— pip cache.cache— user cache directory
Development tools:
AppData/Local/JetBrains— JetBrains IDE caches (check each version)AppData/Local/Google/Chrome— Chrome browser cacheAppData/Local/Microsoft/Edge— Edge browser cache.vscode— VS Code extensions and cache.conda— Conda environments.rustup/.cargo— Rust toolchain.nuget— NuGet packages
Applications:
AppData/Local/Programs— installed programsAppData/Local/Docker— Docker data
Downloads:
Downloads— list largest files withls -lhS
System:
Windows/SoftwareDistribution/Download— Windows Update cache$Recycle.Bin— Recycle Bin
Use du -sh <path> for each directory. Set timeout to 30000ms for large directories.
Step 3: Deep Scan Large Directories
For any directory over 1GB, break it down further:
du -sh <path>/*/ 2>/dev/null | sort -rh | head -10
Step 4: List Largest Files in Downloads
ls -lhS ~/Downloads/ 2>/dev/null | head -20
Step 5: Present Report
Format the results as a clear report with:
- Current status — total, used, free space with percentage
- Safe to clean — caches, temps, old versions (with sizes)
- Consider cleaning — browser caches, large downloads, unused tools
- Actionable table — numbered list with directory, size, and recommendation
Step 6: Offer to Clean
Ask the user which items to clean. For each selected item:
Temp files:
rm -rf /c/Users/keepz/AppData/Local/Temp/*
Old JetBrains caches (keep latest version only):
rm -rf /c/Users/keepz/AppData/Local/JetBrains/<old-version>/
npm cache:
npm cache clean --force
pip cache:
pip cache purge
Windows Update cache:
# Run as admin if possible
rm -rf /c/Windows/SoftwareDistribution/Download/*
Browser cache (Edge/Chrome):
- Instruct user to clear via browser settings (cannot safely delete while browser is running)
Step 7: Verify Results
After cleanup, run df -h /c/ again and report how much space was freed.
Important Notes
- Always check if a JetBrains version is still in use before deleting (keep the latest version)
- Never delete
AppData/Localitself, only specific caches inside it - Some Temp files may be in use — partial cleanup is normal
- For browser caches, recommend clearing via browser settings rather than deleting files directly
- Always show the user what will be deleted before executing
- Use
timeout: 60000for large directory scans
<!-- OB-S:YGQkqjteL-hPZLtzgYBBVQ -->

Scan to join WeChat group