Command Menu

Search pages, blogs, projects, and more...

february 28, 20264 min read

Winmole: I Gave My Terminal Admin Rights. What Could Go Wrong?

Because apparently 'clean up system files' in Windows actually means 'leave half a gigabyte of telemetry data just in case'.

Dev StoryProjectsCLIWindowsGoPowerShell

Winmole: I Gave My Terminal Admin Rights. What Could Go Wrong?

Windows built-in disk cleanup: freed 2MB. My hidden AppData caches: 40GB. The math here is upsetting.

My C: drive bar turned red.

You know the one. That international symbol for "everything is about to break and it is entirely your fault." Standard protocol: download a third-party cleaner. So I went looking.

Option A: "free" cleaners bundled with three toolbars that want to be my default browser and cap you at 500MB of deletion before demanding a $40 annual subscription.

Option B: Actually pay $40 a year for something the OS should natively do, wrapped in an interface that looks like a 2004 Vegas slot machine.

I looked at macOS. CleanMyMac. DaisyDisk. Beautiful, fast, honest about what they're deleting.

I looked back at my red C: drive bar.

"Fine. I'll do it myself."

The WiMo Architecture: PowerShell Does the Work, Go Makes It Look Good

Windows PowerShell is basically the native language of the Windows API. It can touch the registry, query WMI, talk to Winget, manage services. It's deeply powerful and its TUI capabilities are, charitably, equivalent to arranging rocks in mud.

Go, with the Bubble Tea and Lip Gloss frameworks, renders genuinely slick real-time terminal UIs.

So: PowerShell handles the heavy lifting. Compiled Go binaries handle the visuals. The two halves cooperate.

The command surface:

CommandWhat it does
wimo cleanDeep system cleanup — temp files, browser caches, Windows Update leftovers, system logs
wimo uninstallInteractive app uninstaller pulling from Registry, Winget, and local programs
wimo optimizeFlush DNS, clear icon and thumbnail caches, trim SSD, restart services
wimo analyzeGo TUI — real-time directory scanner with live size updates
wimo statusGo TUI — card dashboard: CPU, RAM, disk, network, processes, health score
wimo purgeNuke build artifacts: node_modules, .next, target, __pycache__, Flutter cache

28+ cleanup targets across user caches, browser data, package managers, and dev tool leftovers.

The 4-Layer Safe Delete System

I gave this thing admin rights. That is not a decision to make lightly.

Every deletion goes through four checks before anything touches disk:

  1. Protected path checkC:\Windows, C:\Program Files, and other system-critical directories are hardcoded off-limits
  2. User data pattern check — Documents, Desktop, Downloads, Pictures are always preserved
  3. Recycle bin fallback — files go to Recycle Bin when possible, not permanent deletion
  4. Dry-run previewwimo clean --dry-run shows exactly what would be removed before committing

You can run it with admin rights and not lose your Documents folder. That felt important to test thoroughly.

The Purge Command: Born of Pure Developer Spite

wimo purge was written specifically because I discovered my D: drive had 15GB of node_modules from projects I haven't touched since 2023. Plus Rust target directories. Plus Python __pycache__ scattered across everything.

PowerShell runspace pools run up to 16 concurrent threads for size calculation and deletion. System.IO.Directory.EnumerateFiles() replaces Get-ChildItem -Recurse for scanning that is actually fast. It finds the artifacts, calculates their sizes in parallel, and removes them concurrently.

The --paths and --depth flags let you scope it. wimo purge --paths "C:\Projects" --depth 5 stays in your lane.

The Go TUI: Because Staring at Plain Output Is Suffering

wimo analyze hands off to a compiled Go binary that renders a live-updating directory tree as it scans. Alt-screen mode. Goroutine-per-directory concurrency. The sizes appear in real time as the scan progresses.

wimo status renders a 6-card dashboard — CPU, Memory, Disk, Network, Processes, System — with a health score badge, a Catppuccin-inspired sage green palette, and 2-second auto-refresh via gopsutil. Responsive layout: stacks to a single column below 70 terminal columns.

These are optional binaries. If you haven't built them, the PowerShell wrapper tells you the build command. It doesn't just fail silently.

The Admin-Awareness Detail I'm Proud Of

WiMo badges admin-required tasks in the UI. If you're running as a standard user, it skips those tasks gracefully and tells you why. It doesn't crash, doesn't silently fail, doesn't demand elevation and then complain.

That's not a flashy feature. It's just correct behavior that most tools in this space don't bother with.

Did I Need To Build This?

Could I have right-clicked and deleted the folders manually? Yes.

Could I have bought a larger SSD for cheaper than the time this took? Probably.

But now I have a tool that doesn't try to install a search toolbar, doesn't cap deletion behind a paywall, and actually tells me what it's about to do before it does it.

I consider that a win. Check out Winmole on GitHub. Your C: drive bar doesn't have to be red.