file-cleanup

Scans and cleans disk space on Windows user directories and WSL environments.

7|2|Updated Jul 21, 2026
One-click install
npx skills add https://github.com/alex8224/synapse-agent --skill file-cleanup-alex8224
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-cleanup
Source: https://github.com/alex8224/synapse-agent/tree/main/skills/file-cleanup
Command: npx skills add https://github.com/alex8224/synapse-agent --skill file-cleanup-alex8224

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Disk space fills up silently with package manager caches, browser caches, IDE indexes, updater leftovers, container images, and build artifacts. This Skill locates the largest space consumers on Windows user directories and WSL, classifies them into safe-to-clean versus user-confirmation-required items, executes cleanup, and verifies the space actually freed. ## Core Features & Use Cases - Two-phase scan and clean workflow: First scans with dust or PowerShell to find large directories (npm/uv/pnpm caches, Chrome/Edge caches, JetBrains indexes, WinGet packages, Docker images, Maven/Rust build outputs), then cleans by category. - Safety classification: Separates immediately cleanable caches from items needing user confirmation such as chat history, browser profiles, project source code, and WSL virtual disks. - WSL and VMware handling: Reclaims WSL vhdx space via sparse mode, prunes Docker images inside WSL, and correctly judges VMware .vmem/.vmsn files before any deletion. - Use Case: Your C drive is nearly full. Run the scan to discover that uv cache, Chrome cache, and old scoop versions consume 40 GB, clean the safe items automatically, and confirm before touching anything containing personal data. ## Quick Start Scan my disk and user directory for large space consumers, then clean the safe caches and tell me how much space was freed.

Frequently Asked Questions about file-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find what is taking up disk space on Windows?

Use dust with commands like dust -d 1 -z 100M -b -P -r -o gb $HOME to list directories over 100MB sorted by size. If dust is unavailable, fall back to PowerShell Get-ChildItem with Measure-Object to sum file sizes per directory.

How do I clean package manager caches like npm, uv, and pnpm?

Each tool has a built-in clean command: uv cache clean, npm cache clean --force, yarn cache clean, pnpm store prune, and nuget locals all -clear. These remove only rebuildable caches, so projects re-download dependencies on next use.

Can I delete the WSL ext4.vhdx file to free space?

No, deleting the vhdx destroys the entire WSL distribution. Instead reclaim space with wsl --manage <Distro> --set-sparse true --allow-unsafe followed by wsl --shutdown, which lets sparse mode release physical space without admin rights.

Why does dust report a much larger size for my WSL vhdx file?

dust reports the logical file size of sparse vhdx files, which overestimates actual disk usage. Check real physical allocation with fsutil file queryAllocRanges and confirm sparse status with fsutil sparse queryflag before attempting any compaction.

Is it safe to delete VMware .vmem and .vmsn files?

Only orphaned hex-suffixed .vmem files from clean shutdowns are safe to delete. Suspended-session memory must be discarded by powering on the VM in VMware, and snapshot files must be removed through VMware's snapshot deletion, never manually.

What files should never be deleted during disk cleanup?

Never delete WSL virtual disks, chat history folders, browser profile data outside Cache directories, project source code, or credential files like .ssh and .git-credentials. These contain irreplaceable user data, unlike rebuildable caches.