Skip to main content

Quick start

Four commands: prove the guards, look, rehearse, then reclaim. Nothing is deleted until the fourth.

1. Prove the guards on this machine

npx windowsweep --self-test

The self-test parses every script and checks that every path any section declares lies outside the protected paths. It runs fixtures with a real junction. They prove that links are never followed, that --dry-run changes nothing in the tree it rehearses, and that --yes never selects a personal or project item. It ends with a pass count and exits non-zero on any failure.

2. See what is there

npx windowsweep --scan

It deletes nothing. It writes this run's log and one JSON report under %USERPROFILE%\.windowsweep, and touches nothing else; add --no-report to skip the report. What it prints: a health report (drives, hibernation file, disk images, running apps that block cache steps), every target with its size on disk, and the personal-file scanners' findings.

3. Rehearse the run

npx windowsweep --dry-run --all --yes

Runs the safe batch exactly as a real run would, printing [dry-run] would ... lines and an estimate per section, and writes a JSON report you can export. A non-interactive run defaults to developer mode on; pass --not-developer if that is wrong for the machine.

4. Reclaim

npx windowsweep

The guided walkthrough. On the first run it asks whether you are a developer (see Developer mode), shows a pre-scan, then visits each section: a run, s skip, q quit. Enter runs the section - a is the default at that prompt. Every section names what it removes before it acts and keeps a running total. The summary at the end lists the log, the report and the follow-up commands (admin sections, browsers that were open).

Unattended alternative, for a Scheduled Task or a script:

npx windowsweep --all --yes

5. The admin step

Sections 12, 13, 14, 15, 16 and 20 change things only an administrator may change. The system profile covers 12, 13 and 14:

npx windowsweep --profile system --yes --elevate

The other three are deep sections, and the profile leaves them out: 15 is the hibernation file, 16 is the event logs and permanent, 20 stops Docker and WSL. A batch run refuses a deep section without --i-understand-deep. Name the ones you want with --only. Details and the hibernation decision: Admin sections and elevation.

Last Updated: 2026-09-03