free-disk-space
Free up disk space on a Windows PC. Scans the drive, shows what takes how much space (games, AppData, caches, leftovers of uninstalled programs, large files, system files) grouped into tables, and safely deletes only what the user approves. Use when the user says things like "free up space", "disk is full", "C drive full", "what is taking so much space", "what can I delete", "clear cache", or the Turkish equivalents ("yer aç", "disk doldu", "C dolu", "gereksiz ne silebilirim").
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/akgazii--free-disk-space)HTML
<a href="/listings/akgazii--free-disk-space"><img src="/api/listings/akgazii--free-disk-space/badge.svg" alt="findsafeskills safety rating" /></a>Install
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 95 lines
- ---
- name: free-disk-space
- description: Free up disk space on a Windows PC. Scans the drive, shows what takes how much space (games, AppData, caches, leftovers of uninstalled programs, large files, system files) grouped into tables, and safely deletes only what the user approves. Use when the user says things like "free up space", "disk is full", "C drive full", "what is taking so much space", "what can I delete", "clear cache", or the Turkish equivalents ("yer aç", "disk doldu", "C dolu", "gereksiz ne silebilirim").
- ---
- # Free up disk space
- Goal: show the user clearly **what is where**, then safely delete **only what they approve**.
- Reply in the user's language, keep it short and friendly. Always present findings as **tables with sizes**.
- ## Golden rules
- 1. **Never delete without approval.** Scan and show first; delete only what the user says to delete. If they say "keep it", don't touch it and don't suggest it again.
- 2. If the user wants something protected ("except X", "keep Y"), honor it for the whole session. Pass it to the scan with `-Exclude`.
- 3. **The user's own files** (Downloads, Desktop, Documents, Pictures, Videos, game saves) always go in the "your call" group. Never delete them on your own.
- 4. **Look before deleting**: what is inside, is it really a cache? Folders that look like caches can contain installed programs (see Traps below).
- 5. **Verify after every deletion** (`Test-Path`, free space before/after) and report honestly. Say what could not be deleted and why.
- 6. Give admin-only tasks to the user **as commands**; don't try to elevate yourself. A program's own uninstaller may show a UAC prompt, which is fine; warn the user beforehand.
- ## Workflow
- ### 1. Scan (read-only)
- ```
- powershell -NoProfile -ExecutionPolicy Bypass -File "<this skill folder>/scan.ps1" -MinMB 100 -Exclude "protected1","protected2"
- ```
- Takes a few minutes. Use a long timeout (600000 ms) or run it in the background. Output sections: drives, C:\ root, hiberfil/pagefile, user folder, AppData, installed programs, **orphaned AppData folders**, known caches, Steam/Epic/other games, large single files, Recycle Bin, running programs, Chrome policies.
- ### 2. Show the big picture first
- Answer "what is taking all this space?": Windows (~30 GB is normal), games, AppData, system files, programs, personal files. The hidden culprit is usually **AppData**; explain that.
- ### 3. Group and present
- | Group | Contents |
- |---|---|
- | 🟢 Safe to delete | Caches, updater leftovers, old app-* versions, CrashDumps, Temp, Recycle Bin |
- | 🗑️ Leftovers of uninstalled programs | Orphaned AppData folders. **Point out if they contain game saves** (e.g. game folders under LocalLow) |
- | 🔧 Needs admin | hiberfil, reserved storage, DISM (below) |
- | 🎮 Remove if unused | Games, large programs, Workshop content, two programs doing the same job |
- | 🤔 Your call | Personal files, old backups, duplicates |
- If the user asks what something is, explain in plain words **what happens if they delete it** (e.g. "Spotify re-downloads songs the first time you play them; your playlists stay on your account").
- ### 4. Delete what was approved
- - Use **fully written-out literal paths** (`-LiteralPath 'C:\Users\...\npm-cache'`). Paths built from variables like `$env:...\$var\*` can get blocked by safety checks.
- - Use `-ErrorAction SilentlyContinue` for locked files, then measure what is left and report it.
- - If the related program is open (the scan's "RUNNING PROGRAMS" section shows this), **ask the user to close it.** Don't force-close the user's programs (`Stop-Process`).
- - To remove an installed program, don't delete its folder; use **its own uninstaller** (`QuietUninstallString`, or `UninstallString /S`). NSIS uninstallers exit immediately and keep working in the background: wait 20-30 seconds, then check that the exe and the registry entry are gone.
- - If there is no uninstaller and the program folder is already gone: clean up the Uninstall registry entry (if under HKCU) and the Start menu shortcut.
- ### 5. Summary
- Starting free space → current free space. Table of what was done (✅ / ⚠️ / 🔒 untouched). Remaining options.
- ## Known safe targets and caveats
- | Target | Notes |
- |---|---|
- | npm | `npm cache clean --force`, then delete `%LOCALAPPDATA%\npm-cache` |
- | Yarn / pip / NuGet / .nuget\packages / Gradle `caches` + `wrapper` / Puppeteer / Playwright | Safe; re-downloaded when needed |
- | **Bun** | Only `.bun\install\cache`. `.bun\bin` and `install\global` are the program itself |
- | **Spotify (Store)** | Only `LocalCache\Spotify\Data` (music) and `Browser`. Keep `Default` (may hold login data). Spotify must be closed |
- | **Chrome cache** | The "cache" in Chrome settings is usually small (100-300 MB). The big one is `User Data\OptGuideOnDeviceModel` (on-device AI model, ~4 GB). Delete it while Chrome is closed and **create an empty read-only file with the same name** in its place, or Chrome re-downloads it. Don't touch profile folders (`Default`, `Profile N`) |
- | **Edge** | Windows keeps Edge running in the background even after the user closes it (startup boost). Don't force-close it; have the user press `Ctrl+Shift+Delete` in Edge → "All time" → only "Cached images and files". Old Edge version folders (`Program Files (x86)\Microsoft\Edge\Application\<old>`) are removed automatically after a restart |
- | **AMD / NVIDIA shader cache** | Games stutter a little on first launch after deletion. If the user wants to protect some games: DX11 (`DxCache`) and Vulkan (`VkCache`) hold most games' caches; DX9, OpenGL (`OglCache`) and DX12 (`DxcCache`) are separate folders. File names are hashes, so you can't separate caches per game; explain this to the user |
- | VS Code | `CachedExtensionVSIXs`, `Cache`, `CachedData` are safe. `workspaceStorage` can also go (window state only) |
- | Old `app-*` versions | For programs like Discord and GitHub Desktop, everything except the newest is unneeded |
- | `*-updater` folders | Leftover installer files |
- | Ubisoft `ProgramData\...\patch` | Patch cache |
- | Temp | User Temp is safe. Locked files stay; that's normal |
- ### ⛔ Traps: don't touch
- - **`%LOCALAPPDATA%\Microsoft\WinGet\Packages`**: Not a cache; contains portable programs installed with winget (e.g. FFmpeg).
- - **`C:\Windows\Installer`**: Needed to uninstall and repair programs. Deleting it by hand makes programs impossible to uninstall.
- - **`C:\Windows\WinSxS`**: Never delete by hand; clean only with DISM.
- - **pagefile.sys**: Leave it.
- - `npm\node_modules\@anthropic-ai\claude-code`: the running Claude Code. A sibling folder starting with a **dot**, like `.claude-code-XXXX`, is a half-finished update and can be deleted, but it may be blocked by automatic safety checks; you may need the user to delete it from File Explorer.
- - Game save folders (`AppData\Local\<Studio>`, `LocalLow\<Studio>`, `Documents\My Games`, `Documents\Paradox Interactive`, etc.): the user may want their saves even if the game is uninstalled. **Ask.**
- ### Remind the user
- - **Files deleted in File Explorer go to the Recycle Bin**, so no space is freed. Tell them to empty it or use `Shift+Delete`. When verifying, check the Recycle Bin size too.
- - While a program is installing (e.g. a game download), free space goes down. Don't mistake this for a failed deletion; explain it.
- ## Admin commands (give these to the user)
- Start → `cmd` → right-click → **Run as administrator**:
- | Command | Gain | Effect |
- |---|---|---|
- | `powercfg /h off` | size of hiberfil.sys (usually ~40% of RAM) | Removes "Hibernate"; sleep still works. If Fast Startup is on, it is turned off too (little difference on an SSD). Check `HiberbootEnabled` in the scan and tell the user. Undo: `powercfg /h on` |
- | `DISM /Online /Set-ReservedStorageState /State:Disabled` | ~7 GB | Frees the space Windows reserves for updates. Fails if an update is pending |
- | `DISM /Online /Cleanup-Image /AnalyzeComponentStore` | – | Run this first to see how much can be cleaned |
- | `DISM /Online /Cleanup-Image /StartComponentCleanup` | 1-3 GB | Deletes old update files. Installed updates can no longer be uninstalled. Takes 5-15 minutes |
- | `cleanmgr` → "Clean up system files" | varies | Windows Disk Cleanup |
- ## Extra checks (mention if the scan finds them)
- - **Chrome policies** ("Your browser is managed by your organization"): show which program set what (e.g. a game installer forcing the home page). To remove them, give the user `reg delete "HKLM\SOFTWARE\Policies\Google\Chrome" /f` (and the WOW6432Node equivalent) to run in an admin cmd. Some policies may be intentional (e.g. `ExtensionManifestV2Availability`); keep those.
- - Unusual folders in the C:\ root (names that don't belong to Windows, like `System64` or `WindowsProperties`): tell the user and offer to inspect them.
- - Programs that show up in the registry but have no files: harmless leftovers; just mention them.
README.md · README · 43 lines
- free-disk-space
- claude code skill for cleaning up a windows pc. made it after my c drive had 15gb left and i couldnt even install a game, went through the whole thing with claude by hand and it found like 55gb of junk i had no idea about (appdata was 70gb lol). so i turned that into a skill so i dont have to explain everything again next time.
- it scans the disk, tells you whats taking space and asks before deleting anything. nothing gets deleted unless you say so.
- what it looks at:
- - appdata, which is usually the real problem since its hidden
- - caches that come back on their own (spotify, chrome, npm, yarn, pip, gradle, gpu shader cache, discord, steam etc)
- - folders left behind by programs you already uninstalled
- - old versions apps keep after updating (discord and github desktop do this)
- - chromes on-device ai model, its around 4gb and doesnt show up in "clear browsing data"
- - games, workshop stuff, big files in your user folder
- - hiberfil and reserved storage, which need admin so it just gives you the commands
- - also shows if something is messing with chrome policies ("managed by your organization" thing)
- to install it copy this folder to `%USERPROFILE%\.claude\skills\free-disk-space` so it looks like this:
- ```
- .claude\skills\free-disk-space\SKILL.md
- .claude\skills\free-disk-space\scan.ps1
- ```
- then just tell claude something like "my c drive is full" or "what can i delete" and it picks it up. you can also call it with /free-disk-space. it answers in whatever language you talk to it in.
- if you only want the scan without claude you can run it yourself, it only reads stuff:
- ```
- powershell -NoProfile -ExecutionPolicy Bypass -File scan.ps1 -MinMB 100
- ```
- `-Exclude "some game","another folder"` marks things you want to keep. it takes a few minutes because it adds up folder sizes.
- stuff it wont touch: your own files without asking, game saves, `Windows\Installer`, `WinSxS`, pagefile, and `WinGet\Packages` (looks like a cache but it has actual programs in it, learned that the hard way).
- some things to know:
- - if you delete stuff from explorer it goes to the recycle bin, so you dont get the space back until you empty it
- - deleting the gpu shader cache makes games stutter a bit the first time you open them, then its fine
- - edge keeps running in the background even after you close it, so its cache is easier to clear from edge itself (ctrl+shift+delete)
- only tested on win10 x64.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.