windowsweep 1.1.0 โ 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI-INTEGRATION-GUIDE.md +15 -11
- package/CHANGELOG.md +56 -0
- package/LICENSE +21 -21
- package/README.md +70 -42
- package/VERSION +1 -1
- package/lib/actions.ps1 +212 -212
- package/lib/config.ps1 +108 -99
- package/lib/constants.ps1 +103 -93
- package/lib/fs.ps1 +189 -180
- package/lib/log.ps1 +140 -140
- package/lib/safety.ps1 +541 -493
- package/lib/scan.ps1 +109 -100
- package/lib/ui.ps1 +275 -275
- package/modules/android_avd.ps1 +36 -36
- package/modules/app_caches.ps1 +58 -58
- package/modules/browsers.ps1 +33 -33
- package/modules/build_tools.ps1 +35 -35
- package/modules/crash_trap.ps1 +89 -89
- package/modules/disk_usage.ps1 +49 -49
- package/modules/docker.ps1 +93 -93
- package/modules/editors.ps1 +150 -150
- package/modules/globals_audit.ps1 +236 -236
- package/modules/health.ps1 +101 -101
- package/modules/installed_programs.ps1 +118 -118
- package/modules/menu.ps1 +63 -63
- package/modules/notify.ps1 +60 -60
- package/modules/orphaned_appdata.ps1 +189 -189
- package/modules/personal.ps1 +126 -126
- package/modules/pkg_managers.ps1 +73 -73
- package/modules/projects.ps1 +160 -160
- package/modules/release_helpers.ps1 +438 -438
- package/modules/reports.ps1 +212 -212
- package/modules/runner.ps1 +242 -239
- package/modules/self_test_extra.ps1 +537 -360
- package/modules/startup_audit.ps1 +126 -126
- package/modules/system_admin.ps1 +220 -220
- package/modules/test_runners.ps1 +24 -24
- package/modules/walkthrough.ps1 +80 -79
- package/modules/windows_user.ps1 +118 -118
- package/package.json +2 -2
- package/windowsweep.ps1 +322 -316
package/AI-INTEGRATION-GUIDE.md
CHANGED
|
@@ -22,7 +22,7 @@ summary**, and every human-readable line goes to stderr. `--json` also implies `
|
|
|
22
22
|
|
|
23
23
|
## What `--yes` covers, and what it never covers
|
|
24
24
|
|
|
25
|
-
`--yes` auto-confirms **regenerable caches only**: sections 0-3, 5-10, 21, and 12-
|
|
25
|
+
`--yes` auto-confirms **regenerable caches only**: sections 0-3, 5-10, 21, and 12-13 when the console is
|
|
26
26
|
already elevated.
|
|
27
27
|
|
|
28
28
|
| Never covered by `--yes` | Behaviour |
|
|
@@ -75,7 +75,7 @@ choice, and says so.
|
|
|
75
75
|
"freed_bytes":0,"estimated_bytes":0,
|
|
76
76
|
"sections":[{"section":1,"status":"ran","freed_bytes":0}],
|
|
77
77
|
"candidates":[],"targets":[],
|
|
78
|
-
"refusals":[],"log_file":"...","report_file":"..."}
|
|
78
|
+
"refusals":[],"excluded":[],"log_file":"...","report_file":"..."}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
| Key | Meaning |
|
|
@@ -88,12 +88,18 @@ choice, and says so.
|
|
|
88
88
|
| `estimated_bytes` | What a dry-run says a real run would remove. `0` in a real run |
|
|
89
89
|
| `sections[]` | One entry per section attempted: `section`, `status`, `freed_bytes` |
|
|
90
90
|
| `candidates[]` | What an interactive section offered: `section`, `index`, `path`, `bytes`, `idle_days`, `project`. Always present, empty when none were collected |
|
|
91
|
-
| `targets[]` | Scan mode only: `section`, `label`, `path`, `bytes`. Always present, empty otherwise |
|
|
92
|
-
| `refusals[]` | Human-readable reasons a section was refused in batch mode |
|
|
91
|
+
| `targets[]` | Scan mode only: `section`, `label`, `path`, `bytes`, `newest_write_utc`. Always present, empty otherwise |
|
|
92
|
+
| `refusals[]` | Human-readable reasons a section was refused in batch mode, plus one `excluded: <path>` line per honoured `--exclude-path` |
|
|
93
|
+
| `excluded[]` | Every path an exclusion actually kept, listed once each. Empty means "nothing was excluded", never "not reported" |
|
|
93
94
|
| `log_file`, `report_file` | Absolute paths, or `null` under `--no-report` |
|
|
94
95
|
|
|
95
96
|
`status` is one of `ran`, `dry-run`, `skipped`, `refused`, `failed`.
|
|
96
97
|
|
|
98
|
+
`newest_write_utc` is ISO 8601 UTC (`2026-09-08T13:14:15Z`) - the newest of write, access and creation time
|
|
99
|
+
found anywhere under that target, which is the same rule the idle gate uses. It is **`null`** when the
|
|
100
|
+
target is absent or holds no files, rather than a zero date a caller would sort as if it were real. It is
|
|
101
|
+
emitted only under `--json`, because computing it needs the file walk that `--json` already performs.
|
|
102
|
+
|
|
97
103
|
## Where output lands
|
|
98
104
|
|
|
99
105
|
| Item | Path |
|
|
@@ -122,11 +128,9 @@ answered by a script, so `--elevate` does not belong in an unattended context.
|
|
|
122
128
|
|
|
123
129
|
## Guarantees
|
|
124
130
|
|
|
125
|
-
- **No network calls of its own
|
|
126
|
-
|
|
127
|
-
- **
|
|
128
|
-
- **Protected paths are refused regardless of flags**: drive roots, Windows, Program Files, the profile root,
|
|
129
|
-
personal folders, credentials, toolchains, browser and editor state. No flag bypasses this.
|
|
131
|
+
- - **No network calls of its own**. Self-test check [9] greps every source file for `Invoke-WebRequest`, `Invoke-RestMethod`, `Net.WebClient`, `HttpClient`, `Sockets.TcpClient`, `curl.exe` and `wget`, and fails the run if it finds one. There is no telemetry and no update check. `--report-issue` and `--feedback` hand a URL to the user's browser after they confirm, and neither belongs in an unattended run.
|
|
132
|
+
- - **Every deletion of anything on the user's machine passes one chokepoint** with a declared root, and is refused if it falls outside it. windowsweep's own logs, reports and fixtures are the exception, reachable only through `--cleanup-logs`, `--prune-history` and `--uninstall-data`.
|
|
133
|
+
- - **Protected paths are refused regardless of flags**: every drive root, fifteen declared roots (Windows, System32, SysWOW64, both Program Files folders, ProgramData, `C:\Users` with Default and Public, the profile root, and the AppData Roaming, Local and LocalLow folders), 66 protected subtrees, 50 path patterns and 13 file names. Two paths are declared exceptions - `%LOCALAPPDATA%\Android\Sdk\.temp` and `.downloadIntermediates` - and there are no others. No flag bypasses any of it.
|
|
130
134
|
- **Junctions and symlinks are removed as links, never followed.**
|
|
131
135
|
- **`--dry-run` and `--scan` write nothing** but the log and the report.
|
|
132
136
|
- **Section numbers are a public contract.** 0-25 today; a section may be retired as a no-op, and a number is
|
|
@@ -188,8 +192,8 @@ In `--json` mode every section brackets itself on **stderr**:
|
|
|
188
192
|
```
|
|
189
193
|
|
|
190
194
|
`status` is one of `ran`, `dry-run`, `skipped`, `refused`, `failed`. Scan mode also fills `targets[]`
|
|
191
|
-
(`section`, `label`, `path`, `bytes`) in the final JSON line. `candidates` and `targets`
|
|
192
|
-
empty when nothing was collected.
|
|
195
|
+
(`section`, `label`, `path`, `bytes`, `newest_write_utc`) in the final JSON line. `candidates` and `targets`
|
|
196
|
+
are always present, empty when nothing was collected.
|
|
193
197
|
|
|
194
198
|
## The read-only audits
|
|
195
199
|
|
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,62 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [1.2.0] - 2026-09-08
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`targets[].newest_write_utc` in `--scan --json`.** ISO 8601 UTC, the newest of write, access and creation
|
|
17
|
+
time found anywhere under the target - the same rule the idle gate uses - or `null` when the target is
|
|
18
|
+
absent or holds no files. It costs no extra walk: under `--json` the size pass already enumerates every
|
|
19
|
+
file, so the timestamp comes out of that same enumeration. A human `--scan` keeps the faster path.
|
|
20
|
+
- **`protected` in `--list --json`.** `subtrees` (every protected folder, resolved for this machine) and
|
|
21
|
+
`categories` (the same four sentences `--list-targets` prints). Both readers now take the category list
|
|
22
|
+
from one constant, so the machine-readable copy cannot quietly promise less than the console does.
|
|
23
|
+
- **`excluded[]` in the `--json` summary**, naming every path an exclusion actually kept, once each.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **`--exclude-path` is honoured in every section, not only section 17.** It was parsed globally and read by
|
|
28
|
+
exactly one consumer, so someone who excluded a folder was protected in one section and silently not in the
|
|
29
|
+
other twenty-five. It is now enforced at the deletion chokepoint itself - the one place every section
|
|
30
|
+
already passes through - and an excluded path is refused, logged as `excluded: <path>` and reported in
|
|
31
|
+
`excluded[]`. The same reach applies to `excludePaths` in the config file. **No deletion behaviour widens:
|
|
32
|
+
`--exclude-path` only ever refuses more.** A path that is both protected and excluded still reports the
|
|
33
|
+
protected reason, because that is the promise no flag can lift.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- ๐ด **`--exclude-path` only ever refused the path you named, never anything inside it.** The normalised
|
|
38
|
+
prefix was built with a PowerShell literal `'\'`, which is **two** characters, so the prefix ended in a
|
|
39
|
+
doubled backslash and no child path could ever match it. Excluding a folder protected the folder and
|
|
40
|
+
nothing in it - which is the opposite of what anyone excluding a folder means. The self-test check that
|
|
41
|
+
was supposed to cover this asserted only on the excluded path itself, so it passed throughout; it now
|
|
42
|
+
asserts on a child, and the fix was watched failing on the original bug reintroduced.
|
|
43
|
+
- ๐ด **A dry-run counted files a real run would skip.** `Remove-StaleFiles` applied the protection guard
|
|
44
|
+
only in its real-run loop, so the rehearsal's estimate included protected and excluded files that the run
|
|
45
|
+
then refused - for exactly the files a person most wants the two numbers to agree about. One filter now
|
|
46
|
+
decides both, and a check proves a dry-run and a real prune report the same count and the same bytes.
|
|
47
|
+
- **`--help` said `--permanent` covers "Sections 18/19".** It reaches **18, 19 and 23**: `Send-ToRecycleBin`
|
|
48
|
+
is called from `modules/personal.ps1` (18, 19) and from `modules/orphaned_appdata.ps1` (23). Someone who
|
|
49
|
+
passed `--permanent` believing it applied to two sections would have had section 23's orphaned
|
|
50
|
+
application data deleted outright instead of recycled. The reference docs already said 18, 19 and 23;
|
|
51
|
+
only the engine's own help text - the one place a person actually reads it from - was wrong.
|
|
52
|
+
- **Section 22 declared `Dev = $true` with no behavioural branch**, so `--list --json` advertised a developer
|
|
53
|
+
flag that changed nothing. It now reads `false`, and the Dev column in `docs/sections.md` agrees.
|
|
54
|
+
- ๐ด **`--scan` parsed `--developer` and `--not-developer` and then never read them.**
|
|
55
|
+
`Resolve-DeveloperMode` ran only for the walkthrough, the menu, `--all` and `--only`, so in scan mode the
|
|
56
|
+
flag reached `DeveloperFlag` and nothing looked at it: section 0 printed `Developer mode: not decided yet`
|
|
57
|
+
whatever you passed, and `--json` returned `developer: null`. The desktop window sends those flags to
|
|
58
|
+
`--scan` and could not read back the setting it had just sent. A scan now resolves it from the flag or the
|
|
59
|
+
saved answer and stops there - it may not ask the question, may not write `config.json`, and may not invent
|
|
60
|
+
a decision you never made, so with neither a flag nor a saved answer it still reports "not decided yet",
|
|
61
|
+
which is the truth. **No scan result changes:** the scan reports what is on disk, not what a run would
|
|
62
|
+
remove, and `Show-ScanTable` never read the developer answer in the first place.
|
|
63
|
+
- **The hibernation target's one-line note contradicted the section's own explanation two lines below.** It
|
|
64
|
+
said `reduced` keeps Fast Startup "at roughly 40% of RAM", which is the size of the **whole** file; the
|
|
65
|
+
section intro says `reduced` is about half of that. The note now states the figure once, on the thing it
|
|
66
|
+
belongs to: the full file is about 40% of RAM and `reduced` keeps roughly half that.
|
|
67
|
+
|
|
12
68
|
## [1.1.0] - 2026-09-04
|
|
13
69
|
|
|
14
70
|
### Added
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Ahsan Mahmood
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ahsan Mahmood
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h1>windowsweep</h1>
|
|
6
6
|
|
|
7
|
-
<p><strong>
|
|
7
|
+
<p><strong>Developer-aware Windows cleanup CLI: dry-run first, personal folders refused, zero install via npx.</strong></p>
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/windowsweep)
|
|
10
10
|
[](https://www.npmjs.com/package/windowsweep)
|
|
@@ -19,16 +19,18 @@
|
|
|
19
19
|
|
|
20
20
|
> [!IMPORTANT]
|
|
21
21
|
> **This tool deletes files.** Most of what it removes are caches that rebuild themselves; personal files it
|
|
22
|
-
> lists go to the Recycle Bin; two sections
|
|
23
|
-
>
|
|
22
|
+
> lists go to the Recycle Bin; and two sections - emptying the Recycle Bin, clearing event logs - are
|
|
23
|
+
> permanent, with no undo of any kind. Those two sit behind `--i-understand-deep`, along with the hibernation
|
|
24
|
+
> file and disk-image compaction. Start with `npx windowsweep --scan`, which deletes nothing, then
|
|
24
25
|
> `npx windowsweep --dry-run --all --yes`, which shows exactly what a real run would remove.
|
|
25
26
|
> **Windows only** - npm refuses to install it elsewhere.
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
It
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
What it reclaims is the disk space that quietly disappears on a Windows machine: package-manager and build caches,
|
|
29
|
+
browser and app caches, Windows temp and update leftovers, stale `node_modules`, half-finished downloads.
|
|
30
|
+
It names every path before it touches one, keeps the caches you used in the last 100 days, never follows a
|
|
31
|
+
junction and makes no network calls at all. One question on the first run decides whether your developer caches
|
|
32
|
+
are pruned on the idle gate or cleared completely. A PowerShell engine sits behind a thin Node launcher, so `npx
|
|
33
|
+
windowsweep` runs it with nothing to install.
|
|
32
34
|
It is the Windows member of a family with [linux-cleanup](https://github.com/aoneahsan/linux-cleanup) and
|
|
33
35
|
[macleanup](https://github.com/aoneahsan/macleanup).
|
|
34
36
|
|
|
@@ -41,7 +43,7 @@ It is the Windows member of a family with [linux-cleanup](https://github.com/aon
|
|
|
41
43
|
| **Platforms** | Windows 10 (1809+) and Windows 11 |
|
|
42
44
|
| **Install size** | ~109 kB packed ยท ~366 kB unpacked ยท 44 files ยท no dependencies |
|
|
43
45
|
| **Undo** | Recycle Bin for personal files; none for caches (they regenerate) |
|
|
44
|
-
| **Status** | Stable ยท
|
|
46
|
+
| **Status** | Stable ยท 1.1.0, released 2026-09-04 |
|
|
45
47
|
|
|
46
48
|
<a id="table-of-contents"></a>
|
|
47
49
|
## ๐งญ Table of Contents [#](#table-of-contents)
|
|
@@ -57,6 +59,7 @@ It is the Windows member of a family with [linux-cleanup](https://github.com/aon
|
|
|
57
59
|
- [๐ป Command Line](#command-line)
|
|
58
60
|
- [๐งช Examples](#examples)
|
|
59
61
|
- [๐๏ธ Advanced Features](#advanced-features)
|
|
62
|
+
- [๐ฅ๏ธ Desktop app](#desktop-app)
|
|
60
63
|
- [๐ Recovery & Troubleshooting](#recovery-troubleshooting)
|
|
61
64
|
- [๐ง Limitations](#limitations)
|
|
62
65
|
- [โ FAQ](#faq)
|
|
@@ -78,8 +81,8 @@ Yarn and npm caches, Gradle, Cypress and Playwright browsers, Android emulator i
|
|
|
78
81
|
`node_modules` for a project you finished in spring, editor caches, two hundred profiles' worth of Chrome cache.
|
|
79
82
|
Clearing them by hand means keeping a private list of paths and remembering which ones bite back.
|
|
80
83
|
|
|
81
|
-
A cleaner that
|
|
82
|
-
|
|
84
|
+
A cleaner that clears every cache it finds trades one problem for another: the next `yarn install` downloads
|
|
85
|
+
the lot again, and your afternoon is gone. `windowsweep` takes the narrower path.
|
|
83
86
|
|
|
84
87
|
| | `windowsweep` | Windows Disk Cleanup / Storage Sense | A wipe-everything cleaner |
|
|
85
88
|
|---|---|---|---|
|
|
@@ -93,22 +96,25 @@ twelve gigabytes and your afternoon is gone. `windowsweep` takes the narrower pa
|
|
|
93
96
|
|
|
94
97
|
Nothing here can promise a number. How much comes back depends on your disk; `--scan` measures it.
|
|
95
98
|
|
|
96
|
-
**Not the right tool when** you want a
|
|
97
|
-
siblings); when you want an undo for caches (there is none - they regenerate); or when you are looking for a
|
|
98
|
-
security scanner or a registry cleaner.
|
|
99
|
+
**Not the right tool when** you want a set-and-forget cleaner that runs itself; when you are on Linux or macOS (use
|
|
100
|
+
the siblings); when you want an undo for caches (there is none - they regenerate); or when you are looking for a
|
|
101
|
+
security scanner or a registry cleaner. The rest of what it cannot do is under [Limitations](#limitations). It
|
|
102
|
+
reclaims disk space, nothing else.
|
|
99
103
|
|
|
100
104
|
<a id="features"></a>
|
|
101
105
|
## โจ Features [#](#features)
|
|
102
106
|
|
|
103
107
|
- **Developer mode** - one question on the first run. Yes keeps package, build and test-runner caches used in
|
|
104
108
|
the last 100 days and the newest version of every versioned tool; no clears them completely.
|
|
105
|
-
- **26 numbered sections** - from package-manager caches to Windows Update leftovers, plus
|
|
106
|
-
audits (global packages,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
- **26 numbered sections** - from package-manager caches to Windows Update leftovers, plus three read-only
|
|
110
|
+
audits (global packages, idle programs, startup items) that report and delete nothing. Orphaned application
|
|
111
|
+
data is a fourth 1.1.0 section and is **not** an audit: it asks you to pick, row by row, and what you pick
|
|
112
|
+
goes to the Recycle Bin. Every section names its paths before it acts, and the numbers are a public
|
|
113
|
+
contract.
|
|
114
|
+
- **One deletion chokepoint** - refuses drive roots, Windows, Program Files, your profile root, personal folders,
|
|
115
|
+
- credentials, toolchains and browser or editor state; asserts every deletion sits inside its declared target; never
|
|
116
|
+
- follows a junction or symlink; handles paths beyond 260 characters; skips files another program has open. Self-test
|
|
117
|
+
- check [6] walks every directory and file target and fails if one resolves inside a protected path.
|
|
112
118
|
- **A dry-run that writes nothing** - `--dry-run` short-circuits every deletion and every destructive command
|
|
113
119
|
and reports an exact estimate. `--scan` and `--list-targets` are read-only.
|
|
114
120
|
- **Personal files go to the Recycle Bin** - partial downloads and large stale files are listed, you pick, and
|
|
@@ -120,18 +126,19 @@ security scanner or a registry cleaner. It reclaims disk space, nothing else.
|
|
|
120
126
|
- **Running-app guard** - an open browser, editor or app keeps its caches; the tool tells you which to close.
|
|
121
127
|
- **Session reports** - schema-versioned JSON, exportable to Markdown or a self-contained HTML page, plus
|
|
122
128
|
`--json` for scripts.
|
|
123
|
-
- **Self-test** - 151 checks prove the guards on your machine with a real junction, a
|
|
129
|
+
- **Self-test** - 151 checks prove the guards on your machine with a real junction, a 445-character path and
|
|
124
130
|
a dry-run fixture before you trust it.
|
|
125
|
-
- **Offline by design** - zero network calls
|
|
131
|
+
- **Offline by design** - the command-line tool makes zero network calls: no telemetry, no update check.
|
|
132
|
+
Self-test check [9] fails the build on an HTTP or socket call in the source. Crash bundles stay on disk.
|
|
126
133
|
|
|
127
134
|
<a id="platform-support"></a>
|
|
128
135
|
## ๐ฑ Platform Support [#](#platform-support)
|
|
129
136
|
|
|
130
137
|
| Platform | Supported | Notes |
|
|
131
138
|
|---|---|---|
|
|
132
|
-
| Windows 11 | โ
| Same engine and PowerShell hosts; a real run on Windows 11 is on the verification list ([
|
|
139
|
+
| Windows 11 | โ
| Same engine and PowerShell hosts; a real run on Windows 11 is on the verification list ([project status](https://github.com/aoneahsan/windowsweep/blob/main/docs/features/windowsweep-completion/00-tracker.json)) |
|
|
133
140
|
| Windows 10 (1809 and later) | โ
| The primary development target; every real run so far |
|
|
134
|
-
| Windows Server 2019+ | โ ๏ธ | Uses nothing newer than 1809; CI runs the self-test and a dry-run on Windows Server (`windows-latest`) on every push, but no real cleanup has been run on Server |
|
|
141
|
+
| Windows Server 2019+ | โ ๏ธ | Uses nothing newer than 1809; CI runs the self-test and a dry-run on Windows Server (`windows-latest`) on every push to `main` and every pull request, but no real cleanup has been run on Server |
|
|
135
142
|
| Linux | โ | `os: ["win32"]` makes npm refuse to install; use [linux-cleanup](https://github.com/aoneahsan/linux-cleanup) |
|
|
136
143
|
| macOS | โ | Use [macleanup](https://github.com/aoneahsan/macleanup) |
|
|
137
144
|
|
|
@@ -178,7 +185,7 @@ survives `npx` evictions. Full detail:
|
|
|
178
185
|
<a id="quick-start"></a>
|
|
179
186
|
## ๐ Quick Start [#](#quick-start)
|
|
180
187
|
|
|
181
|
-
Prove the guards, look, rehearse, then
|
|
188
|
+
Prove the guards, look, rehearse, then reclaim:
|
|
182
189
|
|
|
183
190
|
```powershell
|
|
184
191
|
npx windowsweep --self-test
|
|
@@ -205,7 +212,7 @@ comes back but costs minutes, *Recycle Bin* is recoverable until you empty it (`
|
|
|
205
212
|
| 1 | Package-manager caches (npm, yarn, pnpm, bun, deno, pip, uv, Composer, NuGet, Cargo, Go, pub) | rebuilds | - | safe ยท developer-gated |
|
|
206
213
|
| 2 | Build-tool caches (Gradle, Maven, Android, Unity, JetBrains) | rebuilds | - | safe ยท developer-gated |
|
|
207
214
|
| 3 | Test-runner browsers (Cypress, Playwright, Puppeteer) - newest kept | rebuilds | - | safe ยท developer-gated |
|
|
208
|
-
| 4 | Android emulators idle N+ days | slow | - | opt-in |
|
|
215
|
+
| 4 | Android emulators idle N+ days | slow | - | opt-in, developer-gated |
|
|
209
216
|
| 5 | Docker: dangling layers, build cache, unused images older than N days | rebuilds | - | safe ยท developer-gated |
|
|
210
217
|
| 6 | Editor caches, dead workspace storage, uninstalled extension folders | rebuilds | - | safe |
|
|
211
218
|
| 7 | Browser caches, every profile (Chrome, Edge, Brave, Vivaldi, Opera, Firefox, ...) | rebuilds | - | safe |
|
|
@@ -218,10 +225,10 @@ comes back but costs minutes, *Recycle Bin* is recoverable until you empty it (`
|
|
|
218
225
|
| 14 | Component store cleanup (DISM) | rebuilds | yes | opt-in |
|
|
219
226
|
| 15 | Hibernation file off or reduced | config | yes | deep |
|
|
220
227
|
| 16 | Clear Windows Event Logs | **permanent** | yes | deep |
|
|
221
|
-
| 17 | Stale project build artefacts (`node_modules`, `dist`, `.next`, `target`, ...) | rebuilds | - | interactive |
|
|
228
|
+
| 17 | Stale project build artefacts (`node_modules`, `dist`, `.next`, `target`, ...) | rebuilds | - | interactive, developer-gated |
|
|
222
229
|
| 18 | Partial / orphan downloads | Recycle Bin | - | interactive |
|
|
223
230
|
| 19 | Large stale personal files in Downloads | Recycle Bin | - | interactive |
|
|
224
|
-
| 20 | Docker Desktop / WSL disk-image compaction | config | yes | deep |
|
|
231
|
+
| 20 | Docker Desktop / WSL disk-image compaction | config | yes | deep, developer-gated |
|
|
225
232
|
| 21 | Disk usage report | report | - | safe |
|
|
226
233
|
| 22 | Global packages audit (npm, pnpm, yarn, bun, deno) - never uninstalls | report | - | safe ยท audit only |
|
|
227
234
|
| 23 | Orphaned application data under AppData | Recycle Bin | - | interactive |
|
|
@@ -234,14 +241,14 @@ comes back but costs minutes, *Recycle Bin* is recoverable until you empty it (`
|
|
|
234
241
|
`--profile audit` is where they live. Every section is documented in
|
|
235
242
|
[Sections 0-25](https://github.com/aoneahsan/windowsweep/blob/main/docs/sections.md).
|
|
236
243
|
|
|
237
|
-
###
|
|
244
|
+
### Reclaim interactively
|
|
238
245
|
|
|
239
246
|
```powershell
|
|
240
247
|
windowsweep # guided walkthrough, one confirmation per step
|
|
241
248
|
windowsweep --menu # jump to one section; toggle dry-run and auto-yes
|
|
242
249
|
```
|
|
243
250
|
|
|
244
|
-
###
|
|
251
|
+
### Reclaim unattended
|
|
245
252
|
|
|
246
253
|
```powershell
|
|
247
254
|
windowsweep --all --yes
|
|
@@ -307,9 +314,10 @@ windowsweep [mode] [options]
|
|
|
307
314
|
| `--temp-days N` | `3` | Idle window for temp folders |
|
|
308
315
|
| `--purge-all` | off | ๐ฅ Clear cache targets completely instead of pruning idle files |
|
|
309
316
|
| `--developer`, `--not-developer`, `--forget-developer` | saved answer | Override or re-ask the developer question |
|
|
310
|
-
| `--scan-roots "P1;P2"
|
|
317
|
+
| `--scan-roots "P1;P2"` | auto | Section 17 project roots |
|
|
318
|
+
| `--exclude-path P` | - | A tree to leave alone, in **every** section (repeatable) |
|
|
311
319
|
| `--hiberfil off\|reduced\|keep` | ask | What section 15 does |
|
|
312
|
-
| `--permanent` | off | Sections 18
|
|
320
|
+
| `--permanent` | off | Sections 18, 19 and 23 delete instead of using the Recycle Bin |
|
|
313
321
|
| `--select L`, `--select-file P` | off | Answer an interactive section's selection in advance, by index or by path - the one way sections 17/18/19/23 run unattended |
|
|
314
322
|
| `--notify` | off | A Windows notification when the run ends |
|
|
315
323
|
| `--json`, `--quiet`, `--no-color`, `--ascii`, `--no-report`, `--cleanup-logs` | off | Output and record controls |
|
|
@@ -322,12 +330,12 @@ Every flag, exit code and environment variable:
|
|
|
322
330
|
|
|
323
331
|
| Goal | Command |
|
|
324
332
|
|---|---|
|
|
325
|
-
| See what is reclaimable,
|
|
333
|
+
| See what is reclaimable, without deleting anything | `windowsweep --scan` |
|
|
326
334
|
| Rehearse tonight's cleanup | `windowsweep --dry-run --all --yes` |
|
|
327
|
-
| Reclaim the most space as a developer | `windowsweep --profile dev --yes` |
|
|
335
|
+
| Reclaim the most space as a developer | `windowsweep --profile dev --yes --dry-run` first; the `dev` profile includes interactive section 17, so a real `--yes` run exits 3 unless you add `--select-file` |
|
|
328
336
|
| Reclaim everything a non-developer can | `windowsweep --all --yes --not-developer` |
|
|
329
|
-
| Find `node_modules` in projects idle 6 months | `windowsweep --only 17 --days 180 --scan-roots "D:\work"` |
|
|
330
|
-
|
|
|
337
|
+
| Find `node_modules` in projects idle 6 months | `windowsweep --only 17 --days 180 --scan-roots "D:\work" --dry-run` |
|
|
338
|
+
| Reclaim the browser caches after closing the browsers | `windowsweep --only 7 --yes` |
|
|
331
339
|
| Run the admin sections | `windowsweep --profile system --yes --elevate` |
|
|
332
340
|
| Weekly unattended run | `windowsweep --install-task` |
|
|
333
341
|
| Machine-readable output for a script | `windowsweep --all --yes --json` |
|
|
@@ -347,7 +355,24 @@ Every flag, exit code and environment variable:
|
|
|
347
355
|
[Docs](https://github.com/aoneahsan/windowsweep/blob/main/docs/admin-and-elevation.md)
|
|
348
356
|
- **Report export** - schema-versioned JSON to Markdown or a self-contained HTML page, no extra tools.
|
|
349
357
|
[Docs](https://github.com/aoneahsan/windowsweep/blob/main/docs/reports-and-logs.md)
|
|
350
|
-
- **Crash bundles** -
|
|
358
|
+
- **Crash bundles** - the command line writes one locally on an unexpected exit, never transmitted.
|
|
359
|
+
|
|
360
|
+
<a id="desktop-app"></a>
|
|
361
|
+
## ๐ฅ๏ธ Desktop app [#](#desktop-app)
|
|
362
|
+
|
|
363
|
+
A Tauri window that drives this engine rather than reimplementing it: it runs the bundled `windowsweep.ps1` with `--json --no-color` and carries no cleanup logic of its own. The chokepoint, the protected lists and every refusal are the command line's.
|
|
364
|
+
|
|
365
|
+
- **A run you can watch.**
|
|
366
|
+
- **A picker** for the four sections that ask a person to choose.
|
|
367
|
+
- **Settings, most of them flags.**
|
|
368
|
+
|
|
369
|
+
Screen by screen: [Desktop app](https://github.com/aoneahsan/windowsweep/blob/main/docs/desktop.md).
|
|
370
|
+
|
|
371
|
+
The engine still makes no network calls at all. The window sends usage and crash reports to improve the product for everyone, and there is no switch. Never sent: a file path, a folder name, a drive label, your user name, your machine name, or the contents of anything. Sign-in is separate and optional.
|
|
372
|
+
|
|
373
|
+
The installer is not signed with a paid code-signing certificate, so SmartScreen warns on first run. Every release publishes a SHA-256 checksum and a minisign signature the app's own updater checks; neither is a code-signing certificate. What to do about the dialog: [Desktop app](https://github.com/aoneahsan/windowsweep/blob/main/docs/desktop.md).
|
|
374
|
+
|
|
375
|
+
Download the `.msi` or the `.exe` installer from [Releases](https://github.com/aoneahsan/windowsweep/releases). What each one installs, and what Windows says the first time: [Desktop app](https://github.com/aoneahsan/windowsweep/blob/main/docs/desktop.md).
|
|
351
376
|
|
|
352
377
|
<a id="recovery-troubleshooting"></a>
|
|
353
378
|
## ๐ Recovery & Troubleshooting [#](#recovery-troubleshooting)
|
|
@@ -375,7 +400,7 @@ More: [Troubleshooting](https://github.com/aoneahsan/windowsweep/blob/main/docs/
|
|
|
375
400
|
newest of write, access and creation time - a file can only look fresher than it is, never older. Some old
|
|
376
401
|
caches survive the default window; `--days` and `--purge-all` exist for that.
|
|
377
402
|
- **Admin sections need an elevated console** and a UAC click; a Scheduled Task runs the safe batch only.
|
|
378
|
-
- **Disk Cleanup (section 13) cannot preview
|
|
403
|
+
- **Disk Cleanup (section 13) cannot preview sizes.** Its dry-run names the handlers it would run and nothing more.
|
|
379
404
|
- **No automated test suite beyond `--self-test`.** Correctness rests on the self-test's fixtures, dry-runs and
|
|
380
405
|
real runs on Windows 10 and 11.
|
|
381
406
|
|
|
@@ -387,8 +412,10 @@ Not from a protected folder, and not without asking. Documents, Desktop, Picture
|
|
|
387
412
|
hard refusals. Section 17 lists build artefacts in idle projects and removes only what you select.
|
|
388
413
|
|
|
389
414
|
**Does it phone home?**
|
|
390
|
-
|
|
391
|
-
calls; `--report-issue` opens your browser at a pre-filled page you submit yourself.
|
|
415
|
+
Not the command-line tool. Zero network calls, no telemetry, no update check. The self-test greps the source for
|
|
416
|
+
HTTP and socket calls; `--report-issue` opens your browser at a pre-filled page you submit yourself. The desktop
|
|
417
|
+
window is a separate program and does send usage and crash reports. What it never sends is listed under [Desktop
|
|
418
|
+
app](#desktop-app).
|
|
392
419
|
|
|
393
420
|
**Why keep files used in the last 100 days?**
|
|
394
421
|
Because a developer's caches are what make the next install fast. `--days 30` or `--purge-all` when you want
|
|
@@ -417,8 +444,9 @@ More: [FAQ](https://github.com/aoneahsan/windowsweep/blob/main/docs/faq.md).
|
|
|
417
444
|
| [Admin sections and elevation](https://github.com/aoneahsan/windowsweep/blob/main/docs/admin-and-elevation.md) | before running the system profile or touching the hibernation file |
|
|
418
445
|
| [Reports and logs](https://github.com/aoneahsan/windowsweep/blob/main/docs/reports-and-logs.md) | parsing the JSON or finding a log |
|
|
419
446
|
| [AI integration guide](https://github.com/aoneahsan/windowsweep/blob/main/AI-INTEGRATION-GUIDE.md) | an agent or a script runs it for you |
|
|
447
|
+
| [Desktop app](https://github.com/aoneahsan/windowsweep/blob/main/docs/desktop.md) | you want the window rather than the command line |
|
|
420
448
|
| [Troubleshooting](https://github.com/aoneahsan/windowsweep/blob/main/docs/troubleshooting.md) | something failed |
|
|
421
|
-
| [
|
|
449
|
+
| [Project status](https://github.com/aoneahsan/windowsweep/blob/main/docs/features/windowsweep-completion/00-tracker.json) | you want to know what is verified and what is still open: every phase and sub-task with its state and evidence |
|
|
422
450
|
|
|
423
451
|
<a id="changelog"></a>
|
|
424
452
|
## ๐ Changelog [#](#changelog)
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.2.0
|