C: Drive Purging Plan
Section titled “C: Drive Purging Plan”Consolidated from Core/_WorkingOn/Later/HD Purging.md (original dated 2026-02-06-ish).
Executed 2026-07-21: C: went from 7.9GB → 19.18GB free (Talbot approved all items via task file). See per-item results below; two items remain — Chrome cache and kopia relocation — flagged for a separate small decision rather than auto-executed.
Context
Section titled “Context”- Drive: 240 GB SSD (C:)
- Goal: 50+ GB free for comfortable WSL development
- Baseline: Windows + apps ~150-170 GB, leaving 70-90 GB working space
Immediate actions
Section titled “Immediate actions”- WSL crash dumps — checked: already 0GB (nothing to clear)
- Empty Recycle Bin — Talbot confirmed already <3MB, skipped as unnecessary
- User Temp folder — ✅ done 2026-07-21: cleared, 0.86GB → 0.08GB remaining (some files locked/in-use, skipped silently by
-ErrorAction SilentlyContinue)
Medium priority
Section titled “Medium priority”-
.geminifolder — ✅ done 2026-07-21: removed, 6.1GB recovered (Talbot: rebuilds automatically on next Gemini use) - Chrome cache — checked via
chrome://settings/clearBrowserData: only ~200MB. Talbot decided not worth clearing — closed, no action. - Playwright browsers — Talbot confirmed in use, skipped
Lower priority — review & decide
Section titled “Lower priority — review & decide”- AI IDE caches — ✅ done 2026-07-21:
.windsurf(2.49GB),.codeium(1.07GB),.trae(1.07GB) removed per Talbot (“no longer use”)..vscodeand.cursorleft untouched (still in use). -
C:\xfer\bak(was 4.8 GB) — no decision from Talbot yet, left alone- purged to 90MB
- kopia cache (11.83GB) — ✅ done via my_backup-kopia-cache-relocation (its own
my_backuptask, since it touches the live backup pipeline) — ~12GB freed
Result
Section titled “Result”C: free space: 7.9GB → 52GB (2026-07-21, after Talbot’s own additional app purge) — Temp + .gemini + .windsurf/.codeium/.trae + C:\xfer\bak + kopia relocation + Talbot’s manual app cleanup, combined. Well clear of the diskcheck 20GB threshold; diskcheck itself confirmed working (see LESSONS.md).
Regular maintenance — ✅ scheduled 2026-07-21
Section titled “Regular maintenance — ✅ scheduled 2026-07-21”Talbot’s right that 30GB doesn’t stay 30GB — this was in the plan but never actually executed. Fixed:
-
Script:
D:\FSS\Software\Utils\Windows\cleanup-c-drive.ps1(temp + wsl-crashes cleanup, warns if <20GB free after running) — originally written toC:\Scripts\, relocated per Talbot’s correction (2026-07-21); see feedback-utility-script-placement convention, now inai-config/AGENTS.md -
Scheduled task registered:
MonthlyDriveCleanup— weekly Sunday 9:30am (tighter than monthly; harmless to run more often since it only touches temp files >7 days old),RunLevel: Limited(no elevation — learned from the diskcheck mistake, full path used from the start) -
Verified via actual trigger (not just “registered without error”):
Start-ScheduledTask→LastTaskResult: 0— re-verified again after the relocation -
Windows Disk Cleanup / component store: not automated —
cleanmgr /d C /sageset:1+/sagerun:1needs one-time interactive configuration (the/sagesetdialog). Talbot to run once; after that it could be added to the scheduled script. -
Compact WSL virtual disk — found something bigger than expected: the WSL disk (
ext4.vhdx) is 52.99GB on C:, of which WSL itself only reports 44GB actually used — meaning ~9GB is reclaimable slack from a VHDX that’s never been compacted (grows on write, doesn’t auto-shrink on delete). Why this isn’t automated: compaction requireswsl --shutdown, which terminates every running WSL instance — including whatever’s driving an active session (this one, or any other open WSL terminal/Claude Code session). There’s no safe “on startup” hook for this: the operation is inherently an offline one (WSL must be stopped to touch its own disk file), so it can only run when nothing is using WSL — which an automated trigger can’t reliably guarantee without risking an interrupted session. Better fix than repeat manual compaction:wsl --manage Ubuntu-24.04 --set-sparse true(run once, afterwsl --shutdown) converts the VHDX to a sparse file — Windows then reclaims space automatically as WSL deletes files going forward, largely eliminating the need to repeat this. One-time manual run, not an ongoing automation. Handed to Talbot, see Next Steps.
Preventive — .wslconfig
Section titled “Preventive — .wslconfig”Not applied — flagging a conflict before touching this. No .wslconfig currently exists, which means WSL is using its default memory cap (~50% of host RAM, ~15GB observed) — not literally “uncapped,” but a reasonable default. The Slow Computer.md lesson (2026-02-06, now in LESSONS.md) explicitly notes WSL was deliberately left uncapped for dev work. The purge-plan’s suggested memory=8GB would be a real cut from the current ~15GB default, not a neutral cleanup — could pinch heavy dev workloads (Docker, big builds). Recommend confirming you actually want that trade-off before I apply it, rather than assuming the old note’s suggestion still reflects what you want today.
Dev practices: pnpm exclusively (done), pnpm store prune, sudo apt autoremove && sudo apt clean in WSL.
Quick diagnostics
Section titled “Quick diagnostics”[math]::Round((Get-PSDrive C).Free / 1GB, 2)
Get-ChildItem "$env:LOCALAPPDATA" -Directory | ForEach-Object { $size = (Get-ChildItem $_.FullName -Recurse -Force -EA 0 | Measure-Object Length -Sum).Sum [PSCustomObject]@{ Folder = $_.Name; SizeGB = [math]::Round($size/1GB, 2) }} | Sort-Object SizeGB -Descending | Select-Object -First 10
Get-ChildItem "$env:LOCALAPPDATA\Packages\*Ubuntu*\LocalState\*.vhdx" | Select-Object Name, @{N='SizeGB';E={[math]::Round($_.Length/1GB, 2)}}HD Purging note supersession
Section titled “HD Purging note supersession”This file supersedes Core/_WorkingOn/Later/HD Purging.md — that note has been deleted (content fully migrated here, migrate-then-delete per SSOT).