Skip to content

CLI and guarded cleanup previews ​

The current sweepx binary is the sole executable entry point. It exposes scan, junk, explain, status, cancel, cache, cleaner, trash, Linux delete, and capabilities; scan --tui enters after root admission and scans progressively in the background.

CAUTION

trash remains the default recoverable action and never falls back. Linux delete is a separate bounded file/directory R4 Permanent preview: it requires a resolved absolute path, full-digest foreground-terminal challenge, a closed manifest, per-action durable intent/outcome, and immediate identity revalidation. Link, unbounded/cross-platform Permanent, and general plan/approve/execute remain unimplemented.

Build and inspect capabilities ​

Run from the repository root:

bash
cargo build -p sweepx-cli
cargo run -p sweepx-cli -- --locale en-US capabilities

Global options:

OptionMeaning
`--format humanjson
`--locale zh-CNen-US`
`--unit autob
`--sort sizepath`
--state-dir ABSOLUTE_DIRSelect the SQLite journal directory on Linux or legacy snapshot directory on macOS; Windows defaults to %LOCALAPPDATA%\sweepx\state; the directory must be reachable only by the current user or the command fails closed
--elevateWindows-only in effect, off by default. If the current process is not elevated, request one UAC consent and relaunch itself elevated before doing anything else; the parent then returns the child's exit code unchanged and relays the child's standard output to its own, so pipes and redirection behave exactly as they do unelevated. An elevated process cannot inherit the parent's console -- runas creates a new one that closes when the child exits -- so the child writes to a file the parent generated inside its own private temporary directory, which the parent reads back and forwards. That path is always generated by the parent; an inherited one is stripped. An already-elevated process never relaunches; a declined prompt or an unsupported platform continues at the current privilege level without changing scan results. The flag is not forwarded to the relaunched child, so a second elevation is structurally impossible
scan --no-stateSkip Linux journal or macOS legacy-snapshot writes when later status/operation state is unnecessary or the state filesystem does not support the journal; conflicts with --state-dir

Locale resolution considers the explicit override, locale environment, and system locale; an unrecognized result falls back to en-US. Machine keys and values are not translated.

Ordinary scan selects the human table's first 40 rows directly from typed scan facts. JSON is one compact document, writing every retained fact row incrementally with stable fields, native path encodings and evidence states. Export happens after scanning; this is not a live event stream or a total-output byte limit. A stdout write or flush failure returns 8. Interrupted JSON is not a completed result; a completed scan's persisted state is not rolled back by export failure.

Ordinary entry details share a 128 MiB retention estimate including native ancestor identity chains, container capacity and overhead; this is not a process RSS cap. Exhaustion reports resource_limit and truncates details while preserving accumulated recursive statistics and independent large-file observations. The directory-handle frontier defaults to 128, reserving room in shared native I/O admission. Wide trees defer siblings and prioritize descent into already-open subtrees.

P4a.2 qualification records are not a new command ​

The protocol can now express one exact capability/platform tuple and its evidence as a typed, validated record. Mutation does not use a broad delete flag: it is split into trash.local.file, trash.local.directory, permanent.local.file, permanent.local.directory, and permanent.local.link. The current host's Trash cells and Linux file/directory Permanent cells are degraded previews; link and every non-Linux Permanent cell remain disabled.

These records remain a fail-closed qualification-registry substrate; a degraded preview is not qualified. fixture_conformance_only, fake, stale, incomplete, placeholder, or mismatched evidence can never qualify mutation. A cell could become qualified later only if current real_os_qualification evidence completely matches its exact tuple. There is still no general plan/approval UI; the Permanent adapter covers only bounded regular-file/real-directory trees on Linux.

Plain scan shows file size in bytes reported by the system and sums ordinary-file sizes for directories. Size order is descending file size, rather than estimated reclaimable space. scan --tui shows the current path, entry count, elapsed time and rate; directory sizes and row order update continuously while keeping the focused file selected. The header shows Scanned size while counting, Total size when complete, and Counted size (partial) when observations have gaps. Rows distinguish Waiting, Counting, Complete and Incomplete. Omitting retained descendant rows does not mean their sizes were omitted. Junk allocation breakdowns keep their existing allocation-based presentation.

Opening an unlisted directory immediately starts an independent direct-listing worker while the original recursive scan continues. Existing lists open immediately, and the roots page reports Scanning in background. Leaving an unfinished listing cancels only that listing; abandoned visits do not accumulate requests. Folder sizes inside the opened directory grow and reorder during the original scan, preserving the selected item. Unvisited folders show Waiting instead of an assumed zero. Recursive completion updates the current list from committed size snapshots without rescanning ancestors, preserving progress, results and the current page.

Navigation reuses results from this scan. First opening an already measured child lists only its direct entries and reuses recorded descendant sizes. Returning to a parent or reopening a visited directory reuses its retained list. The footer identifies Scan-time results; press r to rescan the current directory after changes. Refresh clears size reuse and marks old directory totals unchecked. Size snapshots retain at most 16,384 directories and an estimated 16 MiB; lists use the existing bounded browser index. Off-breadcrumb lists are evicted first when necessary, and missing size snapshots fall back to recursive measurement. These are session-local historical display results, not proof of current contents or cleanup authority. See navigation reuse validation.

On macOS, ordinary scans, large-file, duplicate-content and junk analyses rooted at / combine verified System and Data volumes in one tree. Reports and TUI views share admission rules, retaining /Users, /Applications, /Library and other entrances. The same directories also appear under /System/Volumes/Data. Bounded system firmlink mappings and independently admitted, matching native object/filesystem/mount identities establish which alternate entrances are counted elsewhere; totals and analyses include them once. Alternate entrances remain browsable in the ordinary TUI. Unreadable, vanished and excluded-volume entries retain reasons; unknown sizes display — and affected ancestors retain partial totals. Other volumes still need separate admission. Content reads and Trash continue to revalidate the captured native identity chain. Streamed ordinary browsing preserves batch, retained-row and handle budgets and cooperative cancellation without a cumulative traversal-work cap; junk and independent analyses retain their own work and storage limits. See volume admission and deduplication design.

Deep files in the ordinary browser use existing current native length observations: macOS bulk directory attributes, Linux handle-relative statx and Windows current directory records. Direct visible rows and directories retain full native identity checks; unqualified files fall back to full inspection. Persistent previews remain historical, and quiet change notifications do not establish an unchanged tree. This acceleration uses current system facts, not a whole-tree cache hit. Machine fields and evidence states remain unchanged.

Independent large-file ranking ​

bash
sweepx scan --no-state --large-files --min-file-bytes 104857600 --top-files 100 /absolute/root
sweepx --format json scan --no-state --large-files --min-file-bytes 0 --top-files 20 /absolute/root

--large-files independently collects ordinary files during the existing metadata walk. Defaults include file lengths of at least 100 MiB and retain the largest 100 paths across all roots in one invocation. --min-file-bytes accepts an inclusive nonnegative integer file-size threshold in bytes; --top-files allows 1..=10000. Both require --large-files; add --tui for a live ranking view. Ranking always follows descending file size; equal lengths follow observation order, without a tie-order guarantee across volumes or scans.

Human output adds a separate size/on-disk-space table, displaying at most 40 rows. JSON adds data.largeFiles with options, files, observedFiles, qualifyingFiles, unknownLogicalFiles, topKLimited, complete and incompleteReasons. Machine fields, states and decimal byte strings stay identical across locales. Plain scan output has no additional field when the analysis is disabled. Observations reach the collector before ordinary row retention, so later large files can replace smaller top-K rows. A truncated ordinary listing can make the scan partial while this independent ranking has complete coverage.

The collector admits at most a 64 MiB owned-data estimate, including native lineage; this is not exact RSS. Intentional top-K truncation is distinct from unknown file lengths, retention pressure, cancellation, permission/mount boundaries or incomplete traversal. Those gaps remain explicit; an incomplete empty ranking does not prove absence. This performs no-follow metadata observation without reading contents. Hard-link paths remain separate aliases. Unknown allocation stays unknown (currently the macOS contract), and no sum is presented as reclaimable space. Large files are not junk candidates. Ordinary human/JSON output is report-only; interactive Trash is an explicit selection in --tui.

Explicit duplicate-content analysis ​

bash
sweepx scan --no-state --duplicates --min-duplicate-bytes 1024 /absolute/root
sweepx --format json scan --no-state --duplicates --duplicate-read-bytes 1073741824 /absolute/root

--duplicates explicitly reads content after the ordinary metadata walk. The default inclusive file-size threshold is 1 KiB; --min-duplicate-bytes 0 also compares empty files. Size grouping excludes same-object hard-link aliases and repeated observations from overlapping roots, then screens up to 4 KiB each from the prefix and suffix. Samples do not prove duplicate content. A group requires at least two distinct objects with matching complete SHA-256 hashes and successful final native identity, length and change-stamp validation.

--duplicate-max-files defaults to 20000 and allows 1..=100000; --duplicate-read-bytes defaults to 8 GiB and allows 1..=9223372036854775807; --duplicate-deadline-ms defaults to 30000 and allows 1..=300000. All four options require --duplicates, which conflicts with --large-files and supports --tui. One invocation shares a 64 MiB owned-data admission estimate (not exact RSS), an 8 GiB per-file limit, and at most max-files × 4 content-stage range requests, including zero-byte final revalidation. Backends also perform bounded metadata opens/probes, separate from content-stage requests. Content reads are serial with a fixed 64 KiB buffer. Requested ranges are charged before each attempt, including samples and full hashes; failures/short reads do not refund the budget. Delivered bytes are counted separately. Deadlines and cancellation are cooperative between native calls/chunks, without preempting blocked kernel calls.

JSON adds data.duplicates with options, groups, observedFiles, retainedFiles, hardLinkAliasesExcluded, readBudgetChargedBytes, deliveredBytes, readOperations, complete and incompleteReasons. Each group contains sha256, logicalBytes and files preserving native evidence. Machine fields, decimal byte strings and enum values do not change with locale. Human output displays complete digests and at most 40 grouped paths. Plain scan output has no additional field when analysis is disabled; analysis does not depend on the truncated ordinary listing. Traversal/metadata/retention/read-limit/deadline/cancellation/change/provider/read failures remain distinct gaps. An incomplete empty report does not prove absence; a partial overall scan returns 4.

Reads use retained native root/parent lineage, without recovering authority from display paths, following links or entering unadmitted mounts. System + Data transitions from a macOS root scan are independently revalidated. macOS prohibits thread-local dataless materialization; Windows preserves no-recall and refuses offline/recall/reparse attributes; Linux admits only ext4, Btrfs and tmpfs, reporting provider_or_offline for FUSE, overlay, remote or unknown filesystems. Unknown allocation stays unknown. Results select no keeper, sum no reclaimable space, and grant no junk classification or deletion authority. Content hashes are not persistently cached; cross-file results are not an atomic snapshot, and actual cloud-provider behavior still needs host validation.

Live file-analysis views ​

bash
sweepx scan --no-state --tui --large-files --min-file-bytes 104857600 /absolute/root
sweepx scan --no-state --tui --duplicates --min-duplicate-bytes 1024 /absolute/root

Both views require human output and terminal stdin/stdout. Metadata/content work stays on a cancellable worker. Large-file provisional rankings coalesce into the latest snapshot; final rankings and duplicate groups remain reliable. A duplicate cohort closes its full hashes and native checks before later sizes are read, so groups can appear during content IO. File analysis does not reuse old content hashes or automatically classify files as junk.

After delivering results, the worker returns final status and gaps directly, avoiding another complete scan/analysis JSON conversion at completion. Cancellation, state-persistence failure and incomplete scans still block Trash. Native observations, content verification and their retention budgets continue to apply.

Use arrows/j/k to move, Space to mark, a to mark all (at most 256), u to clear, c to cancel, r/R to rescan the whole analysis scope, and q/Esc to leave. In duplicate mode, p toggles the highlighted file as that group's explicit keeper; only one keeper per group is allowed, and no keeper is chosen automatically. Groups remain adjacent in the list. A keeper is visibly marked and cannot be selected for Trash. Refresh preserves stable native keys/selection but clears every keeper choice; cancelled/partial refresh keeps old rows visibly historical.

After complete successful scope analysis, d/Delete submits the marked files (or the highlighted file when nothing is marked). Every selected duplicate group requires an unselected keeper. A bounded background worker rechecks live source stamps, then recomputes the selected copies and keepers with the original shared content-byte/file/request budget and a cooperative deadline covering preflight and content. Up to 512 distinct source/keeper rows have additional metadata-only prechecks. Changed content/stamps, hard-link aliasing, missing evidence, provider/mount/link boundaries or incomplete verification refuse the batch before Trash. The keeper and selected native binding are revalidated again before each move. File ranking uses native file identity/length validation without reading payloads. Important/protected paths are refused; there is no background stdin challenge or permanent-delete fallback.

Each analysis retains at most 16384 view rows and a 64 MiB admission estimate, independently of collector/model bounds. A reliable channel has one slot, plus one bounded producer payload; ranking preview and progress each have one replaceable slot. Content work is serial. Trash shares the process-wide mutation worker quota with junk/quarantine; closing cancels pending work and does not join a blocked kernel call. System Trash success, real cloud providers and target-host behavior still require runtime qualification; the existing final pathname-check-to-Trash race remains.

Ordinary scan sparse previews retain the existing top-K, mandatory boundaries and Others totals, while avoiding repeated copying and serialization of all rows under budget pressure. Generations stream as compact JSON with the existing payload checksum. Actual encoded generations are capped at 65 MiB; an oversized update keeps the current pointer and reports a cache resource gap, without discarding scan facts. Older formats remain readable. This supplies no deletion authority.

Ordinary previews and junk history now share retained native directory handles for loading, publication, corruption copies and read-only diagnostics. Loading admits at most a 64 KiB current pointer and a 65 MiB generation before reading content. Oversized input is neither read nor copied into quarantine; it reports a cache resource gap while retaining current scan results. Unix checks ownership, private permissions, regular files and a single hard link. Windows uses relative handles, explicit private DACLs and reparse/offline/recall rejection. Older JSON/checksums remain compatible; the native cache backend refuses insecure objects, while the older core state preparation still needs its own audit. This does not grant deletion authority or close full preview freshness, native provider behavior or overall memory accounting.

Initial ordinary preview projection has a separate 192 MiB auxiliary storage reservation and one-million row/aggregate cap, checked before row copying and index construction. Exhaustion reports cache.preview.resource_limit, skips the cache update and preserves current scan facts and the previous generation. Directories without aggregates keep unknown counts; Windows boundary names retain native UTF-16. This is not a process memory cap. Before publication, the writer now measures bounded fragments with the same decoder and composes the generation's 256 MiB reservation. Each fragment admits at most 1 MiB encoded data and 8 MiB decoder reservations; refusal preserves the previous generation and current scan. A reusable buffer and promptly dropped temporary rows avoid a complete generation copy. State-directory and provider audits remain open.

Install ​

A release produces archives plus one SHA256SUMS for Linux x86_64/aarch64, macOS Intel/Apple Silicon, and Windows x86_64. The installers verify the checksum and require the archive to contain only a root-level sweepx or sweepx.exe.

bash
curl --proto '=https' --tlsv1.2 -fsSL \
  https://raw.githubusercontent.com/lejunyang/sweepx/main/install.sh | sh
powershell
irm https://raw.githubusercontent.com/lejunyang/sweepx/main/install.ps1 | iex

Release infrastructure does not mean a stable release already exists. Check GitHub Releases and sweepx capabilities before installing.

Normal pushes and pull requests run Rust, schema, site, installer, and native-CLI CI. GitHub Pages deploys independently when main changes. Binary and crates.io publication run only when the HEAD commit message contains the literal [publish] marker. GitHub Release and Pages need no extra token; crates.io requires CARGO_REGISTRY_TOKEN in a protected crates-io environment.

Development-grade read-only scans on all three platforms ​

bash
cargo run -p sweepx-cli -- scan /absolute/path/to/root
# Explicitly skip writes when later operation state is unnecessary
cargo run -p sweepx-cli -- scan --no-state /absolute/path/to/root
  • With no roots, scan selects the current platform filesystem root; you may instead provide relative paths, ~, or one or more absolute roots.
  • The default writes a bounded 40-row file table directly to the terminal; no JSON file is required.
  • The scan runs synchronously, is metadata-only and no-follow, and reports mount/link/resource boundaries and errors.
  • The current Linux capability is degraded, not release qualification.
  • The macOS backend now exposes a handle-bound degraded scanner through the same scan / scan --tui path; that is not release qualification.
  • The Windows backend now provides a handle-relative degraded read-only scanner through scan / scan --tui; that is not release qualification.
  • Linux may explicitly select a SQLite journal directory; macOS may select a legacy snapshot directory; Windows may select a durable state directory, which must be reachable only by the current user.
  • scan --format ndjson currently returns unsupported before scanning. Linux has a bounded SQLite journal, one-transaction complete-stream/terminal persistence, journal-first status, and degraded completed replay through sweepx --format ndjson status --operation-id ID --watch [--after SXCUR1]: it performs one same-snapshot full validation, then reads pages of at most 1024 events from a completed, persisted stream; an unknown but syntactically valid cursor yields stream.reset_required, while malformed cursor usage remains a usage error. Because events are still constructed after the scan, that replay is not live streaming, does not wait for new events, does not create a background operation, and does not support cancel, so scan --format ndjson remains disabled.

Request machine output explicitly for scripts and integrations:

bash
sweepx --format json scan /absolute/path/to/root > scan.json
# Currently returns unsupported; it does not scan
sweepx --format ndjson scan /absolute/path/to/root

Dart and SvelteKit candidates use bounded native content observations. JSON projectFormat contains locale-independent profile, status and reason; statuses are not_checked, recognized, invalid or unknown, and rows without a content profile use null. Validated cache hits are reobserved and the TUI displays the format phase and outcome. Dart recognizes the self-declared pub v2 shape and parent-root reference. SvelteKit checks legacy JSON configuration and generated ambient signatures, then rereads both files; the observation remains explicitly non-atomic. It neither parses arbitrary TypeScript nor evaluates JS configuration or establishes a tool version, exclusive ownership or inactivity. Both profiles remain report-only: bulk, TUI and background Trash refuse them. Defaults allow 256 KiB per file, 32 MiB of worst-case requested payload, 128 candidates and a cooperative 5-second deadline. SvelteKit reserves four complete reads (up to 1 MiB) per candidate, limiting a SvelteKit-only batch to 32 observations. junk --timings reports projectFormats separately; no new option is required.

System scans bound npm discovery to 4,096 filesystem operations, 64 installations, a 4 MiB cumulative data-admission estimate and 64 KiB per path/environment value, using npm’s independent query budget and shared cancellation. Identical cache paths share one direct-child modification-time observation; this is not exact last-use time, and truncated enumeration never returns a partial maximum. JSON npmDiscovery.complete and incompleteReason are locale-independent. Tool-query and installation-inventory gaps produce supplementary warnings and refuse a complete discovery context for legacy cache reuse. They do not change a completed filesystem scan status or block recognized cache cleanup. Actual filesystem/layout gaps remain partial with exit 4; positive installations/candidates and unknown fields remain visible. Explicit project-only scans do not request this inventory and use null for npmDiscovery. Checks are cooperative between synchronous native calls and cannot interrupt blocked kernel operations.

Status snapshots and cancellation ​

On Linux, macOS or Windows, after reading operationId from scan output, the corresponding terminal snapshot can be queried:

bash
cargo run -p sweepx-cli -- \
  --format json \
  --state-dir /absolute/path/to/sweepx-state \
  status --operation-id <OPERATION_ID>

cargo run -p sweepx-cli -- \
  --format ndjson \
  --state-dir /absolute/path/to/sweepx-state \
  status --operation-id <OPERATION_ID> --watch [--after SXCUR1_CURSOR]

cargo run -p sweepx-cli -- \
  --format json \
  --state-dir /absolute/path/to/sweepx-state \
  cancel --operation-id <OPERATION_ID>

status reads persisted terminal state journal-first on Linux and supports degraded completed replay through sweepx --format ndjson status --operation-id <OPERATION_ID> --watch [--after SXCUR1]: it covers only completed, persisted streams, performs one same-snapshot full validation, then returns pages of at most 1024 events; an unknown but syntactically valid cursor yields stream.reset_required, while malformed cursor usage remains a usage error. It does not wait for new events, does not create a background operation, and does not support cancel, so it is not live progress. macOS reads from the legacy snapshot and still has no replay/watch surface. On Windows, state_dir defaults to %LOCALAPPDATA%\sweepx\state and durable snapshots are written there; a state directory reachable by other users fails closed. There is no live in-process registry, so output reports canCancel: false and cancellation remains disabled. The cancel command exists to distinguish not_found, already_terminal, and unsupported honestly, not to pretend it can interrupt the synchronous scan.

status and cancel open existing state only: a missing root or operations/ returns not found without directory creation or permission repair. Legacy snapshot I/O retains native directory handles and refuses links, multiply linked, non-regular or non-private files. macOS reads and write preparation share the no-materialization policy; Linux relative operations retain mount evidence; Windows retains DACL and volume checks. Each snapshot allows at most 8 MiB of encoded data and 65,536 JSON value/key visitor attempts before typed decoding. Refusal returns an error and preserves an older snapshot on write. These allowances are not process RSS or an aggregate state disk quota. Linux journal directory, lock and database share retained handles and mount evidence. Missing journal queries do not create files or repair public permissions. A private SQLite VFS directly reads and writes the admitted database descriptor; WAL/rollback files are acquired and revalidated beneath the retained parent, and connection binding checks the actual C file object. The default VFS is unchanged. Linux OFD locks survive closure of other database descriptors; size and identity checks use relative metadata. The per-journal 32 MiB encoded-length allowance includes DB, WAL, rollback and legacy SHM. At most 64 VFS contexts may remain active, including contexts pinned by leftover file objects after owner retirement. This is not an aggregate state disk or process RSS limit. Native Linux/OFD qualification, the final relative-unlink race, shared admission for legacy component-only audit/other state writers, real providers and target-host qualification remain separate work. Writes request native file flushes (plus retained-parent synchronization on Unix), without claiming power-loss recovery. A post-commit flush failure returns an error but never removes the newly published file.

CLI/Core ordinary-preview, junk-history and explicitly state-scoped compatibility macOS file-index writes share a nonblocking state-root lock with operation snapshots and Linux journals. Default junk entry points do not write file indexes. Cooperating writes admit at most 512 MiB of aggregate file lengths and 4,090 directory/file names, counting unknown ordinary files and coexistence of old, new and temporary files. Cache admission preserves 32 MiB and eight entries within those totals for terminal records; these are admission margins, not preallocation or physical-space guarantees. Only known storage layouts are walked. Unknown directories, links, non-private files or uncertain native evidence refuse new writes without permission repair or operation/audit/recovery deletion. Cache refusal preserves current scan facts; terminal-persistence refusal reports an error and preserves older records. Standalone library cache APIs retain component limits and require explicit state-root APIs for shared admission. Legacy component-only audit APIs, future spill/other writers and noncooperating writers are not all integrated, so the aggregate resource audit remains open. This is not an RSS cap, hard I/O deadline or power-loss guarantee.

Native scan traversal and storage I/O now share 256 handle slots; storage Directory/LockGuard objects also consume a 128-owner subset allowance. Admission precedes opening, duplication or creation, and closing precedes slot release. Shared references do not pay twice. Scan roots/child directories, Linux's separate enumeration streams, identity checks and bounded content reads participate alongside storage directories, control locks, relative data/publication files, enumeration and retained SQLite database/WAL/index files. Foreign SQLite connections keep their file charges after store retirement until actual close. Unix storage exports return a charged NativeFile, whose try_clone reserves first. Exhaustion remains an explicit scanning resource failure, never absence or a complete result. It skips preview caching; native snapshot/audit entry points report native_io_handles or native_authority_handles and retain older records. Opens refused inside SQLite callbacks still return database I/O errors. Temporary ancestor captures also pay, so low remaining capacity can refuse an open; terminal persistence has no reserved handle guarantee. Independently duplicated borrowed File/raw handles, external files before admission, other discovery/NTFS/Trash native helpers and Windows security-token queries remain outside this allowance. It is not a process handle or RSS cap. Native Linux/Windows acceptance remains pending.

Explicit AuditStore::open_in_state_dir now includes the fixed audit/ or permanent-delete-audit/ namespace in shared admission; Linux delete uses this entry point. Bootstrap reserves remaining growth to the 81 MiB SQL peak and all missing names before creation. Refusal does not create the audit child, though the zero-length control lock may already exist. Short SQL intervals and complete execution/recovery claims retain state exclusion through database close and policy restoration. Later SQL checks the control lock binding and process ownership; competing cache writes refuse without waiting. Plans stream from borrowed data with an 8 MiB encoded cap and native exclusive rename, preserving existing or racing destinations. Encoding/restoration refusal before commit removes this invocation's temporary; a post-commit flush error retains the new record. Legacy AuditStore::open keeps component limits and cannot infer a parent state root. Global owner-handle admission, other producers/retention policy, RSS and native target qualification remain open.

Linux/macOS AuditStore now uses the common retained SQLite VFS. The actual opened database descriptor is checked against the expected identity before SQL starts; connection binding also checks the real C file object. DB/WAL/rollback/SHM operations stay beneath the retained directory, with write, truncate and index growth checked in I/O callbacks. DB admits 64 MiB, WAL 16 MiB and the index 1 MiB, with an 81 MiB total across all four file types. NORMAL WAL, existing wire/schema and concurrent reader snapshots are preserved. On macOS, the no-materialization policy covers the complete synchronous SQL, mapped access and close interval; successful restoration precedes returned results and live-claim publication. Consuming execution releases exclusion only after close completes. Refusal neither repairs permissions nor evicts audit records. Windows audit remains unsupported.

The retained SQLite VFS lives in the existing audit crate. Linux journal reuses EXCLUSIVE mode, preserving its layout and 32 MiB quota. AuditStore selects NORMAL WAL; the 64 active-context admission is shared by component users, each shared index maps at most 1 MiB, and database pages are not mapped. macOS tests cover actual audit write refusal, root/database replacement refusal, the complete no-materialization interval, lock retention and crash recovery. Common-driver tests cover concurrent snapshots and default SQLite interoperability, the latter across independent processes only. Same-process default POSIX clients, native Linux runtime, real providers, the final noncooperating unlink substitution, shared state admission for legacy component-only audit APIs and global owner-handle/resource qualification remain open.

Read-only preview-cache diagnostics ​

bash
cargo run -p sweepx-cli -- \
  --format json \
  --state-dir /absolute/path/to/sweepx-state \
  cache status
  • Linux, macOS and Windows all support cache status.
  • It supports human and json only; --format ndjson fails with a usage error before any state/cache directory is created or read.
  • If default or explicit state/cache is missing, the result returns disposition=absent with exit 0 and does not create state_dir, preview-cache/, current.json, or any generation/quarantine directory.
  • Inspection is strictly bounded to preview-cache/current.json, the pointer-selected current generation file, and the flat generations/ and quarantine/ directories.
  • The output kind is cache.status.result, reporting exists, currentGeneration, generationCount, quarantineCount, approxBytes, approxBytesComplete, storedSchema, currentHealth, schemaHealth, and typed warnings[] / errors[].
  • The command does not trigger a scan, repair, quarantine, rebuild, or reveal cached entries, display paths, preview contents, or live filesystem facts.
  • available means only that bounded cache structure and validation are readable; any warning, error, or quarantine presence degrades the result to exit 4.
  • Generation parsing has a separate 256 MiB storage-reservation budget for copied strings, collection capacity and internal enum buffers. This is not a process memory cap. Exhaustion reports current_generation_parse_limit with decimal-string reservationCapBytes, preserving the cache without quarantine. Ordinary scans report a cache resource gap and continue current observations.

Explain from scan JSON ​

bash
cargo run -p sweepx-cli -- \
  --format json \
  explain \
  --scan-json /absolute/path/to/scan.json \
  --candidate-id <OPTIONAL_CANDIDATE_ID> \
  --max-input-bytes 8388608

Input must be an absolute path, conform to the scan.result contract, and stay within the byte limit. On import, Core:

  1. changes provenance to stale preview;
  2. marks coverage incomplete/not revalidated;
  3. produces an explanation while forcing the candidate non-executable/report-only.

The result is useful for understanding, not for planning or execution.

Cleaner metadata ​

bash
cargo run -p sweepx-cli -- --format json cleaner list
cargo run -p sweepx-cli -- --format json cleaner show org.sweepx.cargo-target

list reports packages and compatibility. show exposes full manifest/rule metadata only when the Core version range matches; incompatibility uses a dedicated fail-closed exit. Neither command performs a file action described by a rule. See Cleaner concepts.

A unified junk-discovery entry point is available:

bash
sweepx junk ~/Projects
sweepx junk --tui ~/Projects
sweepx junk --tui --system
sweepx --format json junk .
sweepx --format json junk --system

Project artifact rules are loaded by the catalog and evaluated through the existing cleaner VM by core’s JunkService, shared with future interactive clients. A rule match produces a report candidate only.

Dart .dart_tool requires an ordinary pubspec.yaml in its parent and package_config.json inside itself; SvelteKit 1/2 .svelte-kit requires parent svelte.config.js and both own tsconfig.json and ambient.d.ts. Missing, misplaced, directory or linked markers cannot satisfy structural admission; current content evidence comes from the profiles above. These R3 candidates remain report-only because exclusive ownership and activity are unverified. Source files, lockfiles, custom output paths and SvelteKit 3 layouts are not inferred. Stable rule IDs are dart.tool-state and node.sveltekit-output in every locale.

Junk results open as categories → applications/source locations → cleanup items → nested candidates. Categories cover application caches, browser caches, developer tool caches, project builds/dependencies, temporary files and separate review. Unresolved application names remain source-location labels; same-named projects retain distinct full-location keys. Captured scan identities suppress parent/child double counting. Unknown, lower-bound and historical evidence never becomes an exact current total.

  • sweepx junk --tui (or --regular, with --system retained as a compatible spelling): regular cleanup discovers supported application, system and developer cache locations.
  • sweepx junk --deep --tui: deep cleanup traverses the system disk with both project and platform cache rules. macOS admits verified System/Data volumes; other volumes, permission gaps and resource limits remain explicit. There is no 90-second cutoff. Deep TUI performs one pass and uses manual refresh (r/R), preventing disk-wide notifications from continuously scheduling full rescans. Candidate retention exhaustion continues the read-only walk; omitted results remain partial and cannot authorize cleanup.
  • sweepx junk --tui /absolute/project: explicit roots retain project-only analysis; --deep conflicts with explicit roots and --system/--regular.

Enter expands categories, sources and nested candidates; Esc/Backspace goes back. Space selects a group/item, a selects this level, and u clears selection. Groups select only current eligible candidates. More than 256 items requires drilling down to a smaller batch, with no silent truncation. Parent and child targets cannot enter the same plan. Deselecting part of a selected ancestor retains only other independently recognized eligible child candidates; unclassified remainder never becomes a target. d/Delete opens an exact path preview with logical sizes; arrows/PageUp/PageDown scroll, and Enter confirms Trash. Refresh or candidate updates invalidate the preview. Execution independently revalidates native identities, and project ownership/activity and report-only restrictions remain in force.

i opens read-only files; Enter on a leaf does the same. Fresh results remain inspectable during scanning and after partial completion. q returns to cleanup results. Selecting a cleanable item that needs a recheck starts a targeted check and marks it only after successful completion. Unsupported cleanup or a failed check explains the reason. e groups incomplete/skipped locations by permissions, npm/application discovery, capacity and special files, retaining at most three examples per reason. Expected symlink exclusions do not crowd out errors. The final label distinguishes unchecked locations from expected exclusions. Human reports summarize categories/sources, --details shows evidence, and JSON's additive npmDiscovery.detail retains the first failed discovery location/error.

Caches currently provide historical previews; background work still traverses directories and reads current native file lengths. Preview data cannot authorize cleanup. A slow second scan alone does not establish a cache defect: inspect discovery, traversal, interpretation and cache publication separately.

junk --tui ROOT... shows live scan phases, progress and base junk candidates as fully observed subtrees complete. junk --tui --system discovers conservative system junk roots on the worker and cannot be combined with explicit roots. Rows default to descending file size; --sort path selects path order. Unknown sizes sort after known zero bytes and are never treated as zero. Arrow keys move, Space selects, a selects eligible candidates at this level (at most 256), u clears, r refreshes marked rows or the focused row (all roots in an empty view), R refreshes the entire scope, c cancels, d/Delete previews eligible directory candidates before Enter confirms Trash, and q/Esc goes back or quits at the category overview. Selection survives revisions by stable key. Old, incomplete or failed-Trash rows are historical and require complete refresh before another move. Trash runs on a separate worker with per-item no-follow, object/filesystem/mount revalidation; important/protected paths are refused, and failures never trigger permanent deletion. This mode requires terminal input/output. It conflicts with --timings, --trash, --clean-temp and machine output. On Linux, --quarantine-dir may accompany --system --tui to select a private recovery base on a different filesystem. On Linux/macOS/Windows it displays historical candidate caches after discovering the scope in system mode. All three platforms consume current native file lengths while re-enumerating directories and rebuilding current Git evidence in the background. Historical rows cannot be moved to Trash; refreshing a cached preview scans the entire scope, and a full system refresh rediscovers roots. This view writes no operation journal. Linux temporary objects retain independent measurement facts, with file size distinct from on-disk space. Generic Trash refuses those rows, and refreshing them rescans the system scope. On Linux, x builds a complete quarantine plan for selected temporary objects on a worker. Type clean <full digest> and press Enter to confirm; the input is never prefilled. Arrow/PageUp/PageDown keys scroll the plan, Left/Right inspect long lines, and Esc cancels or closes. Cancellation during removal waits for the result and can leave a partial source plus a complete recovery copy. The result retains the recovery directory and failure reason. Only confirmed transitions remove rows; ancestor accounting becomes historical and requires refresh before another action. Preview and execution exclude scanning/Trash. The separate junk --system --clean-temp entry remains available. Selected directory refresh recurses only into selected subtrees and shallowly enumerates required rule and Git markers along the original native ancestor chain, without entering unrelated sibling subtrees. Old ancestor statistics become historical and require a complete refresh before another action. On macOS, completed local refreshes merge fresh candidate fragments into historical records while retaining historical sibling presentation, without FSEvents queries or file-index merging. Merged records cannot be whole-root hits. Cancellation, incomplete observations or cache admission failure preserve older records; within a single large root, a completed subtree can appear as a base candidate after its own and parent marker enumeration finish. Git interpretation and final completion continue; early display does not permit a move during scanning.

Junk scans release local rule markers when complete subtrees close, retaining candidate coverage and native .git lineage instead of a whole-tree directory index. The default traversal allows up to 4,194,304 directories; candidate, byte, queue, handle and per-directory budgets remain separate and bounded. Limits, permissions and unadmitted volumes still produce partial results. On macOS, junk / and junk --tui / include natively verified System + Data volumes and deduplicate system firmlink aliases, sharing ordinary scan rules. junk --tui --system continues to discover conservative cache roots through platform rules.

Every junk --tui mode performs one scan and keeps the result open for review. Cache writes do not automatically start another revision. r rechecks the focused/selected items, R refreshes the full scope, and c stops the current scan. A targeted recheck rediscovers only the selected application's rules, avoiding unrelated discovery failures. Native change listeners remain an explicit Core API capability; the CLI cleanup view does not enable them.

On macOS and Linux, scan, cleanup and file-detail views share keyboard input handling. Terminal status replies do not hold up later keys, and pasted text is not executed as shortcuts.

Scans that leave scope observations unfinished through cancellation or exhaustion retain displayed candidates. A later complete refresh removes rows no longer matched within its scope, including base rows left by a cancelled scan. Cached previews and base rows whose interpretation never finished have no selected-refresh binding; r rescans all roots for them. Interpreted directory rows can still refresh locally. The session presentation index and the CLI's private result registry each admit at most 16,384 rows and a 64 MiB retained-data estimate across revisions. A new scan does not reset retained usage after failure or cancellation. Rejecting a fresh row or update preserves the corresponding old evidence and stops the revision; the view stays incomplete and cannot authorize Trash. Reliable removals from complete scope observations still remove obsolete rows. These estimates are independent of scan-candidate, event-queue and view budgets, and are not process RSS limits.

Current candidates interpret activity/staleFormats from fresh traversal and the current tool snapshot, and core’s GitEvidenceSession rebuilds current repository, tracked and ignore evidence. The cache stores only traversal coverage and repository-boundary facts inside the candidate, never Git answers; historical ignored / high claims are not replayed. Promotion requires current untracked/ignored evidence, complete coverage and no contained repository. Failures retain base known_generated / medium and an explicit blocker. Parent repositories and exclude configuration outside the selected root are observed in this invocation too.

Explicit roots continue to discover clearly rebuildable project artifacts: Rust target, Node node_modules, Python __pycache__/.pytest_cache/.mypy_cache/.ruff_cache, and common dist/build/out/.next/.turbo outputs. When native paths and traversal evidence can establish the current Git worktree, junk also checks these existing rule candidates with bounded, non-interactive Git queries. An untracked, ignored candidate with no nested repository is labeled classification=known_generated_ignored and confidence=high in JSON; a tracked descendant, gitfile/nested repository, incomplete scan evidence, or Git query failure retains the original classification and adds a blockers[] entry. Git ignore status only strengthens the explanation: it neither discovers arbitrary paths nor grants deletion authority, so local state such as .env.local does not become a candidate merely because Git ignores it.

With no explicit root, Linux --system reports XDG caches and enumerates every direct child of /tmp; names do not participate in the decision. A candidate must be current-user-owned, on the same device, removable from its sticky parent, and recursively inactive for at least seven days by atime, mtime, and ctime. Supported types are directories, regular files, symlinks, FIFOs, and unbound Unix-domain sockets. Directories receive a no-follow walk that sums allocated bytes and newest recursive activity timestamp. SweepX rejects other users' objects, filesystem/mount crossings, external hard links, device inodes, bound sockets, and references visible through current-user cwd/root/exe/fd views (including a held FIFO seen as pipe:[inode]), map_files/mountinfo views, or Unix socket tables in observable network namespaces. References in other users' private processes or mount/network namespaces can remain invisible; if the current-user view cannot be read completely, the report is partial and cleanup is refused. macOS reports children below ~/Library/Caches; Windows admits only depth-2 LocalCache / TempState directories below %LOCALAPPDATA%/Packages. Linux /var/tmp, Windows system cleanup, and package-manager/container shared stores remain outside the matcher.

Linux temporary-object analysis and cleanup revalidation each have independent resource budgets: by default, 1,000,000 observations and a 64 MiB cumulative retained-data estimate; at most 65,536 names and 8 MiB of name bytes per directory; 4 MiB per mount/socket table and 64 MiB of table input per invocation. These are not RSS limits. Cancellation, deadlines and exhausted budgets remain incomplete evidence. A truncated table prefix cannot establish absence of process references, and missing candidates cannot establish absence of junk.

Quarantine preview and execution share sweepx-core::junk::quarantine; the CLI renders and confirms. Display paths and digests cannot recreate the opaque native preview. Plans bind the actual loaded rule bytes, and session callers can require equality with the originally selected measurement. Batches contain at most 256 objects. Default cumulative path admission is estimated at 64 MiB, with 1,000,000 path visits, depth 128, a 1 TiB copy/verification I/O budget and a cooperative 15-minute deadline. Directory enumeration, copy, verification and source removal share cancellation. Reads use the planned length, so concurrent growth cannot cause an unbounded copy. Confirmation input retains at most 256 bytes. Cancellation or exhaustion stops later actions; once removal starts, a partial source tree and a complete recovery copy can remain. This is not atomic rollback, an RSS cap or a hard timeout for blocking kernel calls. Interactive TUI quarantine is integrated; end-to-end execution on a Linux host remains unverified.

Linux system TUI can select a recovery base:

bash
sweepx junk --system --tui --quarantine-dir /mnt/recovery/sweepx

Select temporary objects only; directory candidates still use d/Delete. These plans cannot be mixed. Plan display is capped at 1 MiB and confirmation input at 160 bytes; an oversized plan is refused rather than truncated into authorization. The worker retains the native preview, with one shared mutation worker and one-slot result/confirmation channels. Confirmation expires after 15 minutes. Closing cancels without joining a blocked native call.

Linux can explicitly quarantine this stale temporary-object set:

bash
sweepx junk --system --clean-temp
# optional: --quarantine-dir /absolute/private/directory

This mode accepts only human output in a foreground interactive terminal. SweepX prints every target, size, quarantine location, residual process-observation boundary, and the full canonical digest; the user must type clean <full digest> exactly, because the short fingerprint grants no authority. After confirmation it revalidates device/inode, owner, type, atime/mtime/ctime, age, current-user process references, and mount boundaries for every object, checks free space on the destination filesystem, then copies it into a private 0700 quarantine on a filesystem different from /tmp. Regular files preserve sparse extents, fsync data, and are byte-for-byte verified; directory entries, FIFO/socket types, and metadata are fsynced before the source is removed. plan.json and per-item outcomes.jsonl are made durable before movement; a failure stops later items and reports partial/reconciliation rather than deleting permanently. The default base is $XDG_DATA_HOME/sweepx/quarantine or $HOME/.local/share/sweepx/quarantine.

This is not a replacement implementation of desktop Trash. Freedesktop Trash normally requires a cross-filesystem item to use a .Trash-$UID on the source mount. On this host /tmp is on the root disk while the HOME Trash is on another disk; GIO measured Trashing on system internal mounts is not supported, and an ordinary user cannot create /.Trash-$UID. A desktop Trash can therefore exist while root-filesystem /tmp remains untrashable. SweepX explains this class of failure and never turns a Trash failure into permanent deletion.

How a candidate's size is reported ​

The UI uses “Size” for file bytes and “On disk” for filesystem-reported allocation. Human junk reports label the selected quantity per row and describe their summary as candidate size, without promising freed space. The TUI size column always sums file bytes.

reclaimable prefers the filesystem's allocated size. When the platform will not claim allocation, the apparent file size is reported instead and sizeIsLogical is true.

This matters on Windows, where the adapter deliberately refuses to claim allocation: FILE_STANDARD_INFO describes only the unnamed $DATA stream, so an exact figure would be a guess wherever alternate streams, sparse ranges or compression are involved. That refusal is correct, but taken literally it left every candidate sizeless — measured 2026-09-05, 30 of 30, including 1.8 GB of browser caches. A tool that cannot say how large anything is has not answered the question.

The two quantities are not interchangeable, so the substitution is always visible rather than silent. An allocation that is merely a lower bound does not win by being the nominally correct field: an exactly known file size carries more information. When neither is exact, the allocation-derived evidence is kept, because its reason code explains why the size is missing.

Browser render caches ​

--system reports the rebuildable caches of every Chromium-family installation it finds: the HTTP cache, the compiled JavaScript and WebAssembly cache, and the GPU and shader caches. Discovery enumerates profiles from disk rather than assuming Default, and also covers the shader caches that sit beside the profiles rather than inside one.

Each of the three backends has a different layout, so each rule is guarded by its own marker — Cache_Data, js, and data_1 respectively. An index file cannot be used as a common marker: measured 2026-09-05, two of the three carry none at their root.

What is deliberately not matched: Service Worker CacheStorage, IndexedDB, Local Storage, cookies, and extension state. CacheStorage is named cache but holds PWA offline state, not responses the network can fetch again.

Measured on Windows 2026-09-05 across Edge, Edge Dev, and Chrome: 1.8 GB total, the largest single directory being 611.7 MB of Edge Dev code cache. Assuming a single browser installation would have missed it.

Sizes for a blockfile-backed shader cache include scaffolding — data_0 through data_3 and index are written even when the cache is empty, so an empty one still occupies about 0.5 MB. junk --system --rule RULE_ID selects one category; repeat it for multiple categories, including with --tui. Unknown or foreign-platform IDs are rejected before discovery. Unselected categories are outside this scan; omitting --rule retains full system discovery. Native calls into protected directories can still wait for the OS. Unix npm defaults to ~/.npm, Windows to %LOCALAPPDATA%/npm-cache. Download caches require _cacache with ordinary content-v2 and index-v5 directories. Logs, npx installations and other data for review have separate categories. Missing tool answers remain activity: unknown. A regular no-follow .DS_Store file may accompany pnpm's 256 shard directories; unknown extras, links and directories under that name still reject the layout.

Tool caches: every copy, not just the live one ​

Rules for npm, pnpm and pip do not trust a single location. Discovery enumerates the path the tool reports, the tool's environment override, and the documented platform defaults, then admits a candidate only if its own contents match that cache's layout — for a pnpm store, a files/ directory holding exactly 256 two-hex-digit shards.

Asking the tool answers which copy is live, and the live copy is the one that must not be reclaimed. The abandoned copy is the junk, and it is never the one the resolver names. Measured on 2026-09-05: the pnpm store at the documented default held 146.8 MB last written 2024-10-26, while the store actually in use held 127.5 MB on another volume — a resolver-only rule misses the larger, inert copy entirely.

Two markers are reported. Neither deletes, pre-selects, or reorders anything; classification stays report-only.

FieldValuesMeaning
activityliveThe tool reports this path. Do not reclaim it.
staleA verified cache of this tool that the tool is not using.
unknownThe tool could not be asked, so nothing is claimed. Absence of an answer is not evidence of abandonment.
staleFormatse.g. ["http"]Superseded format directories inside a root whose current format is also present.

unknown exists because of a measured failure mode: on Windows npm ships as a .cmd/.ps1 shim and a direct process spawn does not apply PATHEXT, so the resolver returned nothing and the live cache was briefly labelled stale. Directory identity is likewise resolved through the filesystem rather than by comparing path strings, because case sensitivity is a property of the host and volume; comparing spellings reported one pip cache three times.

staleFormats is reported only when a current generation is present alongside the old one. Otherwise the tool is simply an older version whose only format is the one on disk, and calling it superseded would be wrong. Measured on 2026-09-05: pip's cache held the legacy http format at 73.1 MB last written 2023-12-09 beside the current http-v2 at 0 MB — 99.9% of the bytes sat in a format nothing writes to any more, inside a root that is otherwise live.

File-manager-style TUI and Trash preview ​

trash /absolute/path moves ordinary files/directories directly; important directories require terminal confirmation and protected roots are refused. macOS uses Foundation's native system Trash interface without waiting for Finder AppleScript. It requires lossless UTF-8 paths and refuses other encodings. Some systems omit Put Back; items can be restored by dragging them out of Trash. Identity is still checked before submission, and failure or an unknown outcome never triggers permanent deletion. The native call remains synchronous; cancellation does not prove that an item was not moved.

bash
cargo run -p sweepx-cli -- --locale en-US \
  scan --tui /absolute/path/to/root [/another/absolute/root]
cargo run -p sweepx-cli -- trash /absolute/path/to/item

The TUI consumes the typed result of this live scan without an intermediate JSON file. It auto-enters a single root; multiple roots first appear in a virtual-root view. Use Enter / Right / l to enter a directory, Esc / Backspace / Left / h to go back, arrows or j/k to move, d / Delete to select an item for Trash, and q or Ctrl-C to quit. Trash exits the full-screen view, asks for confirmation, and revalidates the live scan identity; symlinks and reparse points cannot be mutated.

--tui requires terminal stdin and stdout and cannot be combined with --format json|ndjson. The TUI enters after root admission and auto-opens a single root. Direct children appear first; while the background scan runs, recursive directory totals are merged and resorted as explicit lower bounds (>=) at roughly 120 ms intervals. The final result then converges to exact or explicitly incomplete evidence, without retaining descendants as list rows. Recursive detail scans finish one subtree at a time so wide directories do not retain every sibling handle. Progress is coalesced across subtrees; the last update may arrive sooner, and the terminal result still includes all rows. A one-slot progress channel drops superseded intermediate snapshots instead of applying terminal backpressure. Browsing uses at most two independent workers, each retaining one request and its own cancellation state; 30 seconds is each lane’s no-progress deadline renewed by valid scan updates, and navigation or quit does not wait for a non-cooperative worker. Cancellation in the last progress callback also prevents publication of a complete result.

Linux bounded file/directory Permanent preview ​

bash
cargo run -p sweepx-cli -- delete "$(realpath -- /path/to/file-or-directory)"

delete is a Linux-only, R4, irreversible development preview. It accepts a current-user-owned regular file or a real directory tree bounded to 256 actions, depth 64, and 1 MiB of retained path data; regular files require a hard-link count of one. The path must be the resolved absolute path returned by realpath -- PATH, with no . / .. or symlink traversal. Links, special files, mount crossings, root/capability-bearing processes, protected system/home/state/Trash/cwd/executable scopes, and any ancestor or descendant containing .sweepx-protect fail closed. The command accepts only human output with stdin and stdout attached to the foreground terminal.

Before execution it displays the full canonical digest and requires the exact PERMANENT 1 <ACTION_COUNT> <FULL_DIGEST> challenge. The plan is persisted under the current user's private state/permanent-delete-audit/. A directory binds every descendant as a separate action and runs them in postorder. Each action receives its own durable intent, protection/parent/object/type/filesystem/mount/owner/hard-link/fingerprint check, one parent-relative unlinkat or nonrecursive rmdir, and its own outcome. New or replaced objects are never swept in; if earlier actions succeeded, the result is explicitly partial. Linux has no general atomic “unlink only if this basename still names the opened inode” primitive, so an explicit same-UID pathname race remains between the last identity check and unlinkat; this is why the capability stays a preview. There is no unbounded recursion or --yes, --force, --permanently, or --dangerously-delete bypass, and Trash failure never invokes it. Permanent means bypassing Trash; it is not secure erase.

See MangoDisk adoption decisions for acceleration findings, rule provenance, the GPL boundary, and the Linux policy.

Windows scan acceleration and privilege ​

Windows has an accelerated scan path built on native NTFS metadata. Every scan root is qualified read-only before traversal, and a refusal never affects correctness: the portable handle-relative traversal stays authoritative and its totals remain exact.

Acceleration needs a GENERIC_READ volume handle. Measured on this host — the unelevated column on 2026-09-02 against both C: and E:, the elevated column on 2026-09-04 against C::

Requested accessNot elevatedElevated
0 / FILE_READ_ATTRIBUTES / SYNCHRONIZE / bothhandle opens, but the FSCTL returns ERROR_INVALID_FUNCTION (1)identical; still 1
GENERIC_READopen is refused with ERROR_ACCESS_DENIED (5)open succeeds and FSCTL_QUERY_USN_JOURNAL works

The decisive point is that the lower access levels still report the control codes as absent even when elevated. That is not "insufficient rights" but "the function does not exist at that handle level", so there is no reduced-privilege access level to trade down to. Acceleration being unavailable without elevation is a platform property, not an implementation gap. The whole table is measured at both privilege levels by the volume_access_masks_behave_the_same_at_both_privilege_levels probe rather than inferred from the unelevated result.

A refusal appears as one scan.progress event carrying accelerationRefusalReason (a stable machine code, never localized) and elevationMightHelp. Its coverageEffect is observed rather than incomplete: declining an optimization loses no coverage, and an ordinary unelevated scan must not be reported as partial because of it. elevationMightHelp is true only when privilege is genuinely the cause, so the user is not sent to a UAC prompt that cannot fix the problem — elevation does not help when, for example, the volume is not NTFS.

Pass --elevate to request acceleration explicitly; it asks for one UAC consent and relaunches the process elevated. Destructive operations remain hard-refused in an elevated session by design and are not relaxed just because privilege is higher.

When acceleration does qualify, one bulk read of the volume's NTFS metadata produces a preview of each scan root, reported in the scan summary under acceleration:

json
"acceleration": {
  "used": true,
  "preview": {
    "entryCount": "37371",
    "logicalBytes": "14812812602",
    "elapsedMicros": "1058065",
    "exact": true,
    "authoritative": false
  }
}

A refusal is reported in the same place as {"used": false, "reason": "not_elevated", "elevationMightHelp": true}.

Two properties of a preview matter:

  • authoritative is always false. Preview numbers come from a metadata snapshot and carry no reopen recipe, which is what a delete revalidates against. They exist so a large tree can show a total quickly; nothing may be removed on their strength, and the traversal's results supersede them.
  • exact is false when any record under the root could not be resolved. The size is then a lower bound and must never be displayed as precise.

Measured on this host on 2026-09-02 against E:\Projects\sweepx (14.5 GB, 36,531 objects): the preview completed in 1.06 s where the full authoritative scan took 133 s, roughly 126x faster to a first answer. The authoritative scan itself is not made faster — the preview is additive, and its whole-volume read is a fixed cost of about a second, so it only pays off on large trees.

Preview output is verified against an ordinary directory walk, which reaches the filesystem through a completely different code path; the path set and the summed bytes must match exactly.

Historical previews across runs ​

A generation loaded by ordinary scan always reports loadStatus: "stale_preview". It supplies historical record counts; current file facts still come from this run's native traversal. Historical previews grant no deletion authority. The former verified_preview upgrade has been withdrawn.

On macOS, ordinary previews and junk history share the platform thread policy that prohibits dataless materialization during directory opens, enumeration, accounting, reads and publication preparation. Unsupported or denied policy calls never fall back to unprotected reads, and known dataless files are refused. Successful reads also require restoration of the original policy; restoration failure discards the result. Publication completes protected encoding and checked restoration before the relative-name commit, so a restoration failure retains the old pointer. Bounded whole-file reads use the same protection. The native thread policy has been tested on this host; actual cloud providers, Linux journal VFS/OFD runtime qualification, aggregate state retention and native Linux bind-mount qualification remain audit work.

Linux cache directories now retain the mount identity of their opened handle. Children, locks, file reads, accounting and publication temporaries must remain on that directory’s mount and device; matching device/inode values cannot substitute for bind-mount evidence. Missing native fields, mismatches or denial skip the cache while current scanning continues, without following links or treating unknown evidence as zero. An explicitly selected cache root may reside on a separate mounted volume; its descendants cannot cross mounts. Publication rechecks the temporary name binding, while final check-to-rename/unlink races remain open. Native Linux and private-namespace bind-mount tests still need a target-host run.

Ordinary previews retain at most four generations and protect the current one. Accounting examines only the cache root, generations/ and quarantine/, with at most 4,090 non-dot entries in total. The 512 MiB encoded-length quota includes unknown regular files, quarantine evidence and publication temporaries. Unknown files and quarantine evidence are charged but never evicted; unknown directories or uncertain accounting skip the cache update while current scanning continues. Accounting, publication and noncurrent retention share retained handles and a nonblocking lock. Existing permissions are never repaired, and existing generation IDs cannot be overwritten. Preparation may evict noncurrent cache data even if later projection fails; the current pointer remains intact. These bounds cover neither physical allocation nor global state/process memory. Native provider behavior, target-host qualification and substitutions by actors that ignore the lock remain separate audit work.

NTFS coalesces repeated changes of the same reason while a file remains open. An unchanged journal position therefore does not prove unchanged file facts, even with a cursor captured before traversal and full volume coverage. Ordinary previews no longer perform extra journal probes or require elevation to load historical cache data.

WarningMeaning
cache.preview.unverified.no_evidenceThe generation has no validity tokens and remains historical; newly written generations use an empty list.
cache.preview.unverified.legacy_unboundThe old generation contains journal hints without complete scan scope, native volume identity or capture ordering. It remains historical without token parsing or volume probes.

The old validity field and checksum remain compatible, so existing tokens can still be read and preserved. A checksum proves storage consistency, not correspondence to the current filesystem. This change does not affect the independent NTFS bulk preview or its authoritative: false contract.

Commands that do not exist today ​

text
PROPOSED ONLY — NOT IMPLEMENTED
sweepx plan create ...
sweepx plan show ...
sweepx approve ...
sweepx execute ...
sweepx execute ... --dangerously-delete

P3 has library models and fake-execution tests for related concepts, but there is still no general plan/approve/execute CLI. Linux bounded file/directory delete is a separate preview rather than that general surface.

npx-cache ​

One native traversal lists directly requested tools, actual installed versions and the file size of each complete installation including dependencies.

sh
sweepx npx-cache
sweepx npx-cache --package PACKAGE --older-versions
sweepx npx-cache --package PACKAGE --older-versions --trash
sweepx npx-cache --entry 0123456789abcdef --trash
sweepx --format json npx-cache --root /absolute/npm-cache/_npx

An absolute NPM_CONFIG_CACHE supplies _npx; otherwise the default is ~/.npm/_npx on Unix or %LOCALAPPDATA%/npm-cache/_npx on Windows. Use --root to override it. npm is never required to start. Without --trash, only a plan is shown. --older-versions retains the highest installed semantic version per package without querying a registry; equal precedence, including different build metadata, is retained. Unknown versions, multi-package slots and incomplete size coverage are excluded. Unknown or multi-package members exclude their version group; an unrelated identified linked package does not block other complete groups. Package filtering selects direct dependencies; Trash moves whole slots and never splits their shared dependency graph. Execution rereads native identity-bound manifests. macOS/Linux check current-user process arguments and open files; Windows removal lacks an activity adapter. Refusal, partial failure and incomplete coverage remain explicit. All moves use OS Trash. Activity observations are not an exclusive lock; concurrent launches and the final pathname replacement window remain. JSON inventory retains the full root report, while selection describes this plan; fields remain locale-independent.

browser-model ​

sh
sweepx browser-model
sweepx browser-model --version 2025.8.8.1141 --trash
sweepx browser-model --disable-download-config /absolute/chrome-no-model.mobileconfig

The current adapter measures Chrome legacy OptGuideOnDeviceModel/<version> and validates component manifest/config metadata. Explicit macOS selections move whole version directories to Trash; active Chrome, unavailable activity observations, native changes and incomplete data are refused. Removal on other platforms, Edge and Manifest Broker assets are unsupported. Prediction models and whole User Data are not substitute targets. Trash alone does not prevent redownload.

This command only exports a configuration file; it does not write or install a system policy. The macOS configuration export contains only GenAILocalFoundationalModelSettings=1, preserving other component updates. Install it manually and verify value 1 with an OK status in chrome://policy. This blocks the foundation model and Chrome may remove its existing payload; features depending on that model become unavailable. Automatic policy removal does not use SweepX Trash, so quit Chrome and move payloads first if recovery is required. Removing the profile restores the default policy. Export is not installation or verification.

browser-extension ​

sh
sweepx browser-extension bundle --output /absolute/SweepX-Browser-Extension
sweepx browser-extension register --browser chrome --bundle /absolute/SweepX-Browser-Extension
sweepx browser-extension request --browser chrome --profile Default --domain example.com
sweepx browser-extension status

bundle exports embedded assets, a copied native host and INSTALL.txt into a new private directory; existing directories are refused by default. --update replaces generated files only in an identified private SweepX bundle, preserving other files. register supports current-user stable Chrome/Edge on macOS/Linux; use --browser edge for Edge. Windows HKCU registration is manual using the exported guide; Beta/Dev registration is not automated. Unsafe final-directory permissions or linked ancestors are refused without repair.

First load the exported extension directory unpacked from the matching browser's Extensions page with Developer mode enabled. The workbench provides usage summaries, searchable/sortable websites, partition details and a separate clearing confirmation. Scan storage connects automatically; check the browser/profile directory in Connection & settings. Clear a website also works without SweepX: enter an exact hostname or HTTP(S) origin, confirm the current browser profile and choose scope; its size remains unknown. A hostname explicitly includes HTTP/HTTPS default ports, while an explicit origin preserves its port. Subdomains are excluded. The browser launches the local host; no always-running SweepX daemon or network service is needed. Inventory covers recognized native storage, with shared/unattributed categories shown separately, not every site's total footprint.

request queues one exact selection for 15 minutes, without removal. Open the matching extension review tab to apply or reject it. status reports the pending request and last browser-reported result. Connecting checks immediately; visible, idle pages check every five seconds without replacing a domain under review. The manual Check requests button works during domain review. An incoming request resets removal confirmations; reconnecting can display the same unhandled request again. Empty results, expired requests, browser/profile mismatches and read errors are distinct. The request deadline is rechecked immediately before the browser clearing call. API completion does not prove reclaimed bytes. Clearing has no Trash, storage may contain unsynced work, and native profile identity requires user confirmation. Cookies, history, passwords and extension data are excluded.

Keep the same directory for updates: run browser-extension bundle --output /absolute/SweepX-Browser-Extension --update with the new build, then reload the extension and close/reopen its workbench tab. The registered host path stays valid. If previously loading a versioned directory, switch to the fixed extension directory once and use register --replace to adjust the existing SweepX registration. Files are replaced atomically one at a time; the whole bundle is not a transaction. Repeat an interrupted update before reloading. On Windows disconnect browser connections to the native host before updating. No store publication, silent installation or automatic store update is implemented; organizational refusal is never bypassed. User screenshots confirm actual domain/detail display in Edge; browser-managed removal still awaits native acceptance. See the adapter guide.

pnpm-store / osdk-cache ​

pnpm discovers stores, selects admitted content without installed references in the reported scope and builds/revalidates its cleanup plan internally. Without an action it is read-only; ordinary cleanup needs neither entry nor plan. Generic junk --trash and the junk TUI still refuse whole pnpm/osdk roots.

bash
sweepx pnpm-store
sweepx pnpm-store --trash
sweepx pnpm-store --root /absolute/pnpm/store --trash
sweepx pnpm-store --root /absolute/pnpm/store/v11 --tui
sweepx --format json pnpm-store --project /absolute/projects/app
sweepx pnpm-store --project /absolute/projects/app --trash

--root accepts a version root or its container. Otherwise discovery uses installed declarations, PNPM_STORE_DIR, the manager's store path and platform defaults. Supported formats are v3/v10 JSON and v11 SQLite/msgpackr; .modules.yaml accepts both YAML and JSON. Missing declared stores remain explicit. Optional, repeatable --project-root supplies reference scopes. Global defaults search the current directory and existing home-relative Desktop/Projects, Projects, projects, workspace, workspaces, dev. Project cleanup defaults to the project's parent, protecting nearby projects. Reports declare actual scopes and excluded names; they never prove whole-machine or other-user disuse.

--package, --max-links, --unobserved restrict rows/actions. --trash selects all admitted candidates in scope, retaining content owned by other indexes, installed references and unknown/multiple links. Incomplete indexes/searches block cleanup. Package indexes stay for pnpm refetch. Bulk selection accounts for shared ownership across the complete selection, then revalidates files in bounded batches for native recoverable Trash. SweepX does not call pnpm prune or permanently delete content. cleanupLogicalBytes is the unique admitted logical content size, never reclaimed space. An empty admitted selection completes normally.

pnpm project logicalBytes measures installed node_modules/.pnpm files, includes workspace children and deduplicates native hard links within that project. Source, build output and global stores are excluded. Nested project rows overlap and must not be summed. Incomplete sizes remain lower bounds/unknown; allocation and APFS clone extent sharing remain unproven.

OSDK stays independent: offline configuration discovers data/cache roots, overridden by --root / --cache-root. Downloads use --entry CURRENT_DOWNLOAD_ID --trash; models use --entry CURRENT_MODEL_ID --remove-models and do not use Trash. Declarations, locks and shared CAS stay; future sync may download again. TUI d handles caches, Enter opens details. OSDK project sizes remain whole-project logical totals.

Store JSON uses sweepx.managed_cache.result/v1. Multiple discovered stores appear in stores; a single store preserves top-level inventory, selection, results, blocked. Existing rulesDigest, projectDiscoveryComplete, indexComplete, eligible remain. Execution needs the macOS/Linux current-user process/open-file guard; Windows refuses execution and retains read-only reports. See native contracts.

pnpm project cleanup ​

bash
# Installed package bytes, even when the declared store is absent
sweepx pnpm-store --project /absolute/projects/app
# Keep source; retire dependencies and admitted exclusive store content
sweepx pnpm-store --project /absolute/projects/app --trash
# Only this explicit scope retires the entire project
sweepx pnpm-store --project /absolute/projects/app --project-mode project --trash
# Optional detailed dependency/store preview
sweepx --format json pnpm-store --project /absolute/projects/app --project-mode dependencies

Default dependency scope retires observed node_modules within the selected project/workspace, then admits CAS content only when its exact native hard-link count equals one store path plus occurrences in selected dependency trees. Other project references, other index owners and unexplained links retain content. The current invocation builds the plan internally, then revalidates native targets immediately before moving them. Trash preserves links; no assumed link-count decrease grants authority. Failures stop and preserve successful outcomes, without permanent fallback or rollback. Whole-project scope refuses a store inside that project; dependency scope supports a separate project-local store.

Unsupported linked/custom layouts, absent stores, incomplete indexes/references, budgets and unavailable activity guards refuse cleanup. Project bounds remain 256 dependency roots, 65,536 CAS files, 64 MiB plan/frontier metadata and 2,000,000 dependency entries. TUI offers preview commands; project execution uses CLI. Generic junk never triggers this joint cleanup.

Package-only queries use sweepx.pnpm_projects.result/v1; execution and detailed previews use sweepx.pnpm_project.result/v1, preserving plan, directoryPaths, contentPaths, sharedPackages, retainedContentFiles, dependencyLogicalBytes, results. dependencyLogicalBytes describes the target dependency trees, which can be larger than virtual-store package bytes. Neither is reclaimable space; Trash does not immediately free capacity.

site-storage ​

Groups Chromium site data by domain while retaining browser, profile, full storage key, partition and bucket details. The default report is read-only and separate from junk; application state is not automatically disposable.

bash
sweepx site-storage
sweepx site-storage --browser edge --profile Default --domain example.com
sweepx --format json site-storage --browser chrome

macOS, Linux and Windows probe default installation locations for Default / Profile *. --browser uses stable labels such as edge, chrome and edge-dev; --profile matches the exact directory name; --domain matches one hostname, excluding subdomains. Custom profiles, sandbox distributions and non-default StoragePartitions are not inferred.

Three layouts support attribution:

  • service_worker_cache_storage: bounded index.txt reads parse actual protobuf origin/storage_key fields, excluding URLs embedded in cache names.
  • indexed_db: legacy .indexeddb.leveldb / .indexeddb.blob pairs, preserving non-default ports.
  • web_storage: a native-bound QuotaManager main-file observation maps IDs to full storage keys and bucket names for WebStorage/<id>. This is non-atomic and does not replay WAL/journal state; it cannot authorize removal.

Local Storage, Session Storage, Service Worker registration/scripts, extensions and HTTP/code cache are reported as shared categories, without invented domain sizes. Separate macOS/Linux profile cache roots are included. Installation-wide AI/optimization models and component downloads use an explicit @installation scope, without domain attribution; an explicit --profile excludes this scope. New standalone IndexedDB SQLite layouts and unknown buckets remain unattributed while their overall size stays visible.

The machine format preserves sweepx.site_storage.result/v1, profiles, subsystemBytes, fullyAttributed and origins[].storageKey/bytes/directoryCount. Additions include domains, sizeComplete, unattributedBytes, snapshotConsistency, paths and bucket details. Sizes are file lengths, not physical allocation or reclaimable space. Unavailable sizes are null; coverage distinguishes lower bounds from complete values. fullyAttributed=false may represent shared/unknown bytes rather than incomplete filesystem coverage.

Domain filtering affects origin rows; subsystem totals remain unchanged, as recorded in totalsScope. One native traversal supplies parent and child totals. Limits include 32 profiles, 64 MiB of metadata observations and a 16 MiB retained-origin estimate. A two-minute cooperative deadline is checked between native observations; blocked OS calls may delay cancellation. Discovery/scan/metadata failures return partial with exit 4; complete reports exit 0.

Legacy --trash-origin and --browse now refuse with exit 3 before scanning. The former LOCK probe did not establish that all browser writers had stopped, and the generic directory TUI cannot enforce site-data selection. Future removal needs an explicit browser/profile/partition/bucket preview, current mapping and inactivity checks, and native identity revalidation. Display paths and domain summaries are not execution authority. No site data is removed.

Name-column overflow, full paths, and scrolling ​

The name column is much narrower than it looks: the five fixed columns take 67 cells first, and only the remainder is split by percentage. On an 80-column terminal the name column is 6 cells, not 42% of 80. Long paths therefore always overflow, and the browser handles that three ways:

  • an unselected overflowing row ends in an ellipsis, marking that text was elided;
  • the selected row scrolls instead, advancing one cell every 300 ms and repeating after a four-cell gap;
  • p pins the selected row's full path in the footer, which wraps rather than truncates.

Only the selected row scrolls. Animating every overflowing row at once would move the whole list while the user is trying to read one line of it.

The scrolling window is always exactly the column width. Wide characters occupy two cells, and one that does not fit the final cell becomes a blank rather than being dropped - otherwise the columns to the right shift back and forth as the text moves. A character scrolled half off the left edge is padded for the same reason: dropping it made two consecutive frames render identically, so CJK paths stuttered every second step.

The pinned path is for reading only. It is not execution authority; native identity is still revalidated immediately before any Trash operation.

Ordinary Linux/macOS/Windows junk reports and the junk TUI consume current native file lengths. Linux uses no-follow statx relative to the retained parent and requires type, size, device and mount ID. macOS uses the current getattrlistbulk batch. Windows uses online ordinary-file lengths from the current directory batch, excluding reparse, offline/recall, device entries and invalid identities. Junk entry points avoid full file rows and optional file indexes; macOS does not query FSEvents history for optional file indexes by default. Directories, rule markers and candidates still come from fresh traversal; missing or inadmissible facts fall back to ordinary inspection. Allocation, hard-link uniqueness and reclaimable space remain unknown. Ordinary scan, large-file and duplicate analyses, and consumers requesting complete file facts retain full native observations. Root records serve historical presentation only; incomplete scans preserve older records.

Historical candidate records bind rule bytes, source platform, native root identity and nested-root scope. They never qualify current whole-root hits. Every report discovers its required context and classifies fresh traversal facts. Compatibility library file-length indexes remain independently validated; default junk entry points no longer use them.

On reopening regular cleanup, the latest generation from the same request family appears before tool discovery, with sizes labelled “Previous”; current files and configuration are checked in the background. File-read omissions, application locations to check, and exclusions/optional notifications have separate sections; failed tool queries belong to optional notifications. Application IPC sockets are normal exclusions. History improves first paint without skipping directory traversal. Partial scans may retain positive candidates even when a configuration query fails; large histories prioritize outer and larger rows within the same capacity. File traversal has no 90-second or other absolute deadline while progressing; individual external queries retain timeout and cancellation. JSON adds toolQueryFailures (ruleId, detail) and the npm reason probe_timeout. Details identify the failing command; probe_budget distinguishes launch-count exhaustion from an inactivity deadline.

npm, pnpm and pip commands only supplement configuration and installation information. An unconfigured OSDK shim does not block recognition, rechecks or eligible cleanup. JSON adds toolQueriesRequiredForScan: false; npmDiscovery.complete still describes installation discovery itself. Regular scans include default locations and absolute environment configuration; deep scans also recognize supported layouts in old locations from current native directory observations. All successful npm configuration answers participate; an unreferenced location stays unknown and is not classified as unused.

npm categories are tool.npm-cache (downloads), tool.npm-logs, tool.npm-npx (installation slots) and tool.npm-other-data (review). Log cleanup verifies every filename and npm content, then repeats content and current-user process/open-file checks before Trash. Mixed content remains report-only. Verification admits at most 2,048 files and 8 MiB of requested reads per session, with 1,024 direct entries per directory. Debug files and dependency-resolution reports use a 4 KiB prefix; timing JSON requires a complete read within 64 KiB. Exhaustion retains the row but refuses directory cleanup. npx uses the existing npx-cache --root /absolute/cache/_npx version/slot workflow; pnpm retains its independent index/project/link inventory. Unexplained legacy directories and third-party downloads are review-only.

junk --system shares one invocation-scoped snapshot between root selection, classification and tool inventory. Reporting starts no second round of probes. Each tool family has an independent budget: a 10-second timeout and 64 KiB stdout limit per query, with at most 64 launch attempts. Each completed launched attempt renews a 30-second inactivity window; progressing multi-installation discovery has no absolute batch deadline. Unavailable, cancelled, oversized or timed-out answers remain unknown; missing inventory fields are null. Explicit project-root scans do not probe unrelated npm installations.

Tool cache roots, browser and known-cache locations share one bounded invocation layout snapshot. Version expansion and shard fingerprints consume the same budget; classification no longer enumerates or resolves paths per candidate. Defaults allow 4,096 directory probes, 16,384 returned enumeration records, 1,024 rule-root references and an 8 MiB retained-data estimate. A 5-second deadline and cancellation are checked between native calls and cannot interrupt blocking OS access. Missing anchors, permission/observation failures or resource limits set layoutDiscovery.complete to false and provide a stable incompleteReason; the report is partial with exit code 4. Confirmed candidates remain visible; an empty list does not prove there is no junk. Incomplete classification is not persisted as a whole-root candidate cache. Non-interactive cleanup/Trash requests are rejected before discovery. Tool root identity and change fingerprints must agree with current scan facts. Exact shard counts require complete enumeration and no-follow directory checks; links or truncated prefixes cannot establish a match. Activity relationships and old-format hints consume this invocation's native snapshot without granting deletion authority. Paths over 64 KiB are refused at layout admission.

Full refresh enumerates every root to reconstruct current identities and classification markers; notification-triggered local refresh traverses affected scopes and required ancestors. Default junk entry points on all three platforms use current native ordinary-file lengths; compatibility library file-index hits still require current type and equal-length confirmation. Allocation, hard-link uniqueness and reclaimable space remain unknown without the needed metadata. Old candidate rows never justify skipping an entire subtree.

junk --timings emits one sweepx.junk.timings/v1 JSON diagnostic on stderr with nanosecond phase durations for discovery, setup, root-cache validation, file-cache validation, traversal, candidate assembly, Git evidence, cache writes and reporting, plus observed root hits/misses. rootCacheHits remains 0. Default junk entry points no longer prepare file indexes; rootCacheValidation and subtreeCacheValidation remain near-zero phase boundaries. The existing stdout report stays unchanged. This report-only option conflicts with --trash and --clean-temp. complete means reporting reached its end; coverage still comes from the report status. Phase timing starts at junk command dispatch and excludes earlier CLI startup; the benchmark measures process wall time separately.

After cargo build -p sweepx-cli --release, run python3 scripts/benchmark-junk.py --build-label release --output /tmp/junk-benchmark.json. It isolates SweepX state and compares empty-cache scans, warm attempts and controlled file mutations, checking candidate facts and file sizes. Repeat --root /absolute/project to measure existing directories without modifying them. Every attempt retains actual cache hit counts; OS caches are uncontrolled, and small samples report medians only.

The compatibility macOS library SubtreeCacheProvider can still share one FSEvents query, interpreting events against each index’s pre-observation cursor and confirming files against current native type and length. Missing history or query failure falls back to live inspection. Ordinary reports do not read whole-root candidate records; the TUI separately reads historical previews. Neither default entry point queries FSEvents history for file indexes or reads/writes those indexes; stable timing field names are retained.

Compatibility history queries end the run-loop wait when the complete-history marker arrives. That marker covers delivered history and cannot prove a recent write has reached the journal; timeouts and history gaps refuse index reuse. This compatibility API uses a one-shot query; the interactive session separately keeps native notifications alive for local rescanning.

Default junk entry points on all three platforms disable optional file-index retention, and logical aggregation no longer copies an ancestor-path list per file. Classified directory rows, markers, coverage and optional reuse indexes share an estimated-byte budget (256 MiB per invocation and 128 MiB per root by default), which is not a process RSS limit. Rebuildable indexes are evicted before required rule facts. If required facts still cannot fit, the report is partial and human output explains that candidates may be missing. Built-in rules select file markers from the loaded requiredParentMarkers; arbitrary custom evaluators retain all names by default.

The retained progress log is bounded. Omitting progress detail alone does not make a complete scan partial. Error counts, cancellation and actual resource limits remain available independently; live sessions still receive reliable errors and completion.

File-cache keys require a lossless directory path. Native paths that cannot be represented as UTF-8 do not store covered-path/listing entries and fall back to fresh observations; native identities and rule markers remain available. Display paths cannot substitute for execution authority or cache keys.

Historical candidate roots and compatibility macOS library file indexes are stored independently per root, without overwriting other roots on the same device. Default junk entry points publish candidate history only. Roots remain cached between different requests while they fit. Least recently read roots are evicted as complete groups: 4 MiB per file, 8 MiB per root, 64 MiB of managed files and at most 256 roots. Each invocation reads at most 16 MiB of encoded data with a 128 MiB retained-data estimate; neither is a process RSS bound. Optional file-length indexes may be truncated, and missing entries are inspected live. Oversized complete report records are not written. Interactive history may retain a prioritized sparse preview within the same budget; individually oversized rows still preserve old storage. Exceeded limits, old schemas, mismatched identity or request scope, links and non-private cache storage fall back to live observation. Write-lock contention skips persistence without blocking the report.

A compatibility macOS library file-index history query accepts at most 256 absolute UTF-8 roots and 1 MiB of path bytes. Application-owned history is limited to 65,536 events and a 16 MiB estimate including path and Vec capacities. Gaps, wrapped IDs, mount changes, malformed paths or exhausted budgets clear history and disable file-index reuse. All roots share one deduplicated change index retaining the largest event cursor per path. It uses the remaining allowance from the disk cache's 128 MiB retained-data estimate and is itself limited to 16 MiB, rather than copying changes per root. These allowances are not process RSS limits.

Project-rule JSON executionPolicy accepts only report_only or require_ownership_and_activity; omission defaults to the latter and cannot inherit legacy deletion access. Generic dist/build/out/.next/.turbo and Dart/SvelteKit rules explicitly allow reporting only. Rust/Node/Python/Maven still lack independent exclusive-ownership and inactivity proof, so all current project candidates are refused by junk --trash, the TUI and background workers. Names, risk tiers, complete coverage, recognized formats or Git ignored/high cannot substitute for that proof. Reports add a locale-stable executionPolicy: project values are report_only or require_project_ownership_and_activity. Restored cache facts start as not_checked, then rebuild interpretation from current rules; old access is never persisted. Browser offline/application state uses require_user_data_selection with a user_data_requires_explicit_selection blocker: generic junk bulk Trash and junk TUI removal are refused until a separate explicit origin/path selection. Bulk junk removal also requires complete coverage of both the directory row and its recursive aggregate. Other platform rows use native_revalidation_required and still need every existing native-identity, coverage and platform-boundary check; the label supplies no execution authority. Explicit standalone trash PATH operations retain their existing checks.

Actual Dart 2.18.0/3.6.0 recordings cover standalone projects and shared workspaces, including percent-encoded UTF-8 Unicode/space member paths. Invalid or unsupported URI shapes remain unknown, and URI locations are never opened. Recognition does not make shared roots or project output containing personal files eligible for Trash.

The additive cargoOutput.workspace now reports current bounded membership/default selection as isWorkspace, memberCount, defaultMemberCount and projectIsRoot. Native observations support literal/glob members, raw exclusion prefixes, explicit workspace pointers and transitive path dependencies through the existing TOML parser, without executing Cargo. Before publishing, visited inputs are checked again for native identity, content digest and enumerated names; failures remain unknown/invalid rather than producing truncated sets. Non-atomic observations do not certify build validity. Without a configuration override, the default target belongs to the resolved workspace root or standalone package, with source workspace_default or package_default. Declared paths are independently admitted configuration inputs only: they do not expand scan coverage or grant Trash authority. Raw paths and member names are neither reported nor cached persistently. Cargo home supports paths relative to the modeled candidate-parent cwd, empty values falling back to user home, and natively observed missing/non-directory locations falling back to default output. Links, denial, unavailable home environment and uncertain reads remain unknown. Home-relative output bases preserve Cargo's lexical parent spelling; dot/parent bases do not receive exact spelling comparisons. Includes, custom cwd/CLI, OS user-home fallback, native aliases and output-object equivalence remain open, as do ownership and activity proof.

Linux/macOS/Windows junk TUI history shares bounded private storage with no link traversal. Root records bind actual rule bytes, platform, device/file/mount identity and nested-root scope; linked ancestors or missing identities refuse reads. Historical first paint is display only: complete original coverage does not prove current coverage, and activity, Git and execution permission must be rebuilt. Full refresh on all three platforms still traverses directories and observes current file lengths; selected refresh can save fresh subtrees and retain old sibling presentation, with every replayed row marked historical. Default macOS entry points also merge candidate history only; compatibility library file indexes retain independent change-history validation. Missing cursors remain null, never zero. v9 root records rebuild; the macOS file-index schema is unchanged. Before cloning candidates, each root has a separate 4 MiB retained-data estimate. Cancellation and individually oversized candidates preserve previous records. Incomplete scans may save positive observations while retaining unobserved historical siblings. This allowance is not a process RSS limit.

Windows state-directory owner/DACL checks read one descriptor from the same opened directory handle and reject final reparse/offline/recall objects. Privacy accepts only fully interpreted ordinary allow/deny ACEs; unfamiliar grant layouts, malformed boundaries or unreadable information are refused. Existing controlled ownership remains: the token's user/owner SID, or Administrators when that group is actually present in the user's token. Token information is admitted up to 256 KiB per read, native SIDs use bounded aligned storage, and SDK text admits at most 32,767 native UTF-16 units without embedded NULs. These are individual admission limits, not RSS bounds or hard deadlines for blocking OS calls. This check does not bind subsequent pathname operations. Junk history and legacy operation snapshots now use retained handles; other state paths and full execution-path race audits remain open.

Windows junk TUI can now restore historical first paint. Cache reads, publication and eviction use retained directory/file handles and the shared protected DACL policy. Reparse/offline/recall objects, remote devices, volume crossings and multiply linked files are refused. Ordinary absolute drive paths (including verbatim drive paths) are supported; UNC/device namespaces and unknown filesystems fall back to fresh scanning. Linux/Windows have no current file-index hits. Cache-directory enumeration observes at most 4,096 entries, including unknown names; Windows pages stay at 64 KiB. Zero progress, truncation or exhausted allowances make the cache unavailable while the scan continues. Existing disk eviction limits apply after successful publication; failed eviction may leave the published generation. This cache promises neither crash durability nor an RSS bound. Native Windows/MSVC/provider acceptance remains pending.

Browser-managed domain removal:

sh
sweepx site-storage --browser edge --profile Default --domain example.com --export-delete-plan /absolute/new-plan.json

SweepX now embeds the extension and native host; see browser-extension. Clearing still requires loading the extension in the matching profile. Connect for domain/key/bucket and shared-category inventory, or specify a website without connecting. The plan-file import entry is removed. Choose scope, confirm the current profile and click Confirm clearing; no hostname retyping is required. Only browsingData and nativeMessaging permissions are requested, with no network calls or direct database-directory removal. See the adapter guide for scope, confirmation and acceptance limits. Legacy filesystem removal flags remain refused.

Nested project artifacts ​

Use sweepx junk --details ROOT (or --format json junk --details ROOT) to include nested Rust outputs, Python environments and Vite dependency bundles. Parent/child rows overlap; summary bytes count outer candidates only. TUI shows the nested categories and Enter opens read-only detail. These new rules are report-only, and --details conflicts with cleanup flags. See artifact detail contracts.

Interactive cleanup and incremental updates ​

Junk scans check known folders while optional npm/pnpm/pip location queries run in the background; newly discovered locations are checked in the same scan. Open an npx or pnpm item to browse packages, versions and project references inside the current terminal. Select items, press d to preview, Enter to confirm Trash, or Esc to cancel. Returning updates the relevant directory.

e opens scan coverage with checked, incompletely read and skipped locations; select a location and press Enter to recheck it, or i for reasons. f updates locations from changes delivered during this session, r rechecks selected items, and R rescans everything. Missing or lost change records, replaced roots, and absent usable change batches make f fall back to a full scan. Across restarts, disk history remains a previous-results preview; it cannot skip unvalidated trees. A local update does not establish a new whole-disk observation.

Development documentation. Destructive features remain unavailable or unqualified.