Skip to content

Releases

remove-except v0.6.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 05:27
597524f

Highlights since v0.5.1

  • Add --size-at-least and --size-below to keep regular files by logical size, alongside the existing pattern and modification-time conditions.
  • Add the opt-in --require-match and --max-delete-items <N> deletion safety guards. These guards are checked before confirmation or deletion and cannot be bypassed with --force.
  • Extend JSON schema 2 with guard settings, guard violations, and file-size bounds.
  • Add --generate-completion <SHELL> for static Bash and PowerShell completions, and make help output adapt to terminal width.
  • Fix date-time conversion for Jiff 1.0. Rust 1.88 remains the minimum supported version; Windows and Ubuntu remain supported.

Downloads

  • Windows x64 (MSVC): remove-except-v0.6.0-x86_64-pc-windows-msvc.zip

  • Linux x64 (GNU): remove-except-v0.6.0-x86_64-unknown-linux-gnu.tar.gz

  • Each archive has a matching .sha256 file. Verify the archive checksum before extracting or running it.

  • Verify build provenance with GitHub CLI:

    gh attestation verify <archive-path> --repo tresuke/remove-except --signer-workflow tresuke/remove-except/.github/workflows/prepare-release.yml

Binaries are built with pinned cargo-auditable and audited with cargo audit for both the lockfile and target binaries. Embedded dependency information and attestations do not guarantee that a binary is safe.

Install from crates.io

Install Rust 1.88 or later, then run:

cargo install remove-except --locked

Full changelog since v0.5.1

remove-except v0.5.1

Choose a tag to compare

@github-actions github-actions released this 16 Nov 08:09
2b97ebd

Highlights since v0.4.0

The v0.5.0 tag was not published as a release. This v0.5.1 binary release is the first available release containing the v0.5.0 feature set.

  • Add --modified-since (inclusive) and --modified-before (exclusive) to select files by modification time. Multiple patterns use OR semantics; pattern matches and the time range are combined with AND semantics. Dates and offset-free date-times use local time; explicit offsets are also supported. See the README for accepted formats and platform details.
  • Deletion safety: Time conditions directly match regular files only. Links, empty directories, and special files may be deletion targets even when explicitly named. If no file matches all keep conditions, everything under the processing root may become a deletion target. Review the complete plan with --dry-run and without --summary before deleting.
  • JSON output advances to schema 2. It includes the selected patterns and resolved time bounds, and direct_match_count now covers all direct keep-condition matches. Consumers expecting schema 1 must update. The library adds build_plan_with_options and ModifiedRange.
  • Update dependencies, including globset 0.4.20 to 0.4.21 and libc 0.2.189 to 0.2.191; add jiff for time handling.
  • Rust 1.88 remains the minimum supported version. Windows and Ubuntu remain supported.

Downloads

  • Windows x64 (MSVC): remove-except-v0.5.1-x86_64-pc-windows-msvc.zip

  • Linux x64 (GNU): remove-except-v0.5.1-x86_64-unknown-linux-gnu.tar.gz (built on Ubuntu 22.04; glibc 2.35 or later)

  • Each archive has a matching .sha256 file. Verify the archive checksum before extracting or running it.

  • Verify build provenance with GitHub CLI:

    gh attestation verify <archive-path> --repo tresuke/remove-except --signer-workflow tresuke/remove-except/.github/workflows/prepare-release.yml

Binaries are built with pinned cargo-auditable and audited with cargo audit for both the lockfile and target binaries. Embedded dependency information and attestations do not guarantee that a binary is safe. This is a binary-only release; the package is not published to crates.io.

Full changelog since v0.4.0

remove-except v0.4.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 02:26
fe8d442

Compatibility and deletion safety

This minor release includes an intentional input-compatibility change. Review every item with --dry-run and without --summary before deleting; keep/delete decisions can differ from v0.3.0.

  • Non-Unicode paths: build_plan now rejects a normalized root or any scanned entry path that cannot be represented as Unicode, in human output and the public API as well as JSON. It returns no partial plan and reports a runtime error without ValidationError. The CLI exits with code 1 before stdout, confirmation, or deletion, including with --force. Inputs that previously succeeded can now fail. Valid U+FFFD names remain supported; child symlink targets are not followed.
  • Ubuntu glob matching: ? and character classes match Unicode scalar values, not UTF-8 bytes. Combining sequences can require multiple wildcards. Case sensitivity and path-separator rules are preserved. Recursive globs keep matching newline-containing names; literal backslashes before hex-looking text remain literal.
  • Confirmation: An unterminated y or yes at EOF now cancels with code 3 and deletes nothing. v0.3.0 documented Enter to confirm and EOF to cancel, but its distributed implementation accepted unterminated affirmative answers. Every input path now requires a newline-terminated affirmative line.

Display and documentation

  • Tree previews keep directory subtrees contiguous, including retained parents and prefix-sharing siblings. Flat/JSON/plan order and deletion order are unchanged.
  • Colored summary headings show KEEP: in green and DELETE: in red. Uncolored wording is unchanged.
  • A private section enum replaces comparisons against display strings without changing output.
  • Rust Doc examples use owned temporary fixtures instead of deleting predictable temporary paths.
  • Documentation clarifies that a plan records observed entries: traversal is not atomic or locked and does not prevent concurrent changes. This is not a new locking or revalidation guarantee.
  • Correct confirmation help indentation and synchronize bilingual behavior/migration descriptions and developer release documentation.

Distribution and verification

  • Windows x64: remove-except-v0.4.0-x86_64-pc-windows-msvc.zip

  • Linux x64: remove-except-v0.4.0-x86_64-unknown-linux-gnu.tar.gz (built on Ubuntu 22.04; glibc 2.35+, supported on Ubuntu)

  • Each archive has a matching .sha256 asset and contains the binary, both READMEs, and both project licenses.

  • Before extracting or running, verify SHA-256 against the matching checksum file. Verify build provenance with:

    gh attestation verify <archive-path> --repo tresuke/remove-except --signer-workflow tresuke/remove-except/.github/workflows/prepare-release.yml

  • Binaries are built with pinned cargo-auditable and audited with cargo audit for both the lockfile and target binaries. Embedded dependency names/versions and attestations are not a guarantee of safety.

  • Rust 1.88 remains the minimum for source builds. Windows/Ubuntu support, public API types, JSON schema version 1, and existing CLI options remain unchanged except for the input policy above.

  • No macOS, ARM64, musl, crates.io package, or docs.rs publication is provided.

  • The archived READMEs retain the previously available installation instructions at tag time. Current v0.4.0 installation links are synchronized on main after verified publication; published archives/tags are not replaced.

Included pull requests

  • #15: Colored summary headings.
  • #16: Newline-terminated confirmation and accurate version history.
  • #17: Contiguous Tree subtrees and ordering regressions.
  • #18: Unicode scalar glob semantics and newline/backslash regressions.
  • #19: Safe Rust Doc fixtures and accurate plan guarantees.
  • #20: Typed display section semantics.
  • #21: Early non-Unicode path rejection.

Post-v0.3.0 installation and developer-release documentation also includes #13 and #14.

remove-except v0.3.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 05:31
3355783

remove-except v0.3.0

Highlights

  • Prebuilt Windows x64 (MSVC) and Linux x64 (GNU) binaries, with SHA-256 checksum files.
  • UTF-8 stdin keep patterns with --patterns-from-stdin and machine-readable pre-deletion plans with --format json (schema_version: 1).
  • A built-in viewer for long human-readable plans, with scrolling, section navigation, grapheme-aware path wrapping, and resize handling.
  • A final-confirmation recap showing the processing directory, keep/delete counts, and applicable warnings on stderr.

Important upgrade and deletion-safety notes

  • Keep/delete results can change. Braces ({ and }), and backslash escapes on Ubuntu, now count as glob syntax rather than literal-directory recursive-retention prefixes. Previously retained descendants may become deletion targets. reports/{2024,2025} keeps matching directories but not their contents; use reports/{2024,2025}/** for descendants. Back up important data and review every item with --dry-run and without --summary after upgrading.
  • Confirmation now reads a whole line on every input path. Only y or yes followed by Enter confirms (case-insensitive; surrounding whitespace ignored). Other answers, empty input, and EOF cancel.
  • Exit codes changed: cancellation returns 3 instead of 0; invalid arguments, stdin input, roots, or patterns return 2; runtime failures return 1; successful preview or deletion returns 0. Update automation that relies on previous exit codes or single-key confirmation.
  • --pager auto is the default and opens the viewer for long terminal output. Use --pager never for ordinary output. c finishes viewing only; Enter and y in the viewer never authorize deletion. q, Escape, and Ctrl+C cancel without deletion (code 3). Pending viewer input is discarded and terminal state restored before a separate whole-line confirmation.
  • With stdin patterns or after viewing, confirmation uses the controlling terminal, not consumed stdin. If confirmation has no terminal, nothing is deleted (code 3). An unavailable explicitly requested viewer or terminal failure returns 1; auto explains pre-start fallback on stderr. --pager always conflicts with JSON and --force (code 2).
  • Stdin patterns are newline-delimited UTF-8 (LF/CRLF). One leading BOM is stripped, completely empty lines are ignored, other whitespace is preserved, and there is no comment syntax. Invalid UTF-8 or NUL is rejected with a line number. CR is removed only as part of CRLF. Each line is a path/glob, not an escaped literal filename; NUL-delimited input is not supported.
  • JSON contains exactly one pre-deletion plan on stdout, not an execution result. Messages and prompts go to stderr. Unrepresentable Unicode paths fail before JSON output or deletion. Human layout, summary, and type-sort options conflict with JSON.
  • The viewer does not change keep/delete decisions or deletion order. The same plan is reused, but it is not a protected filesystem snapshot. Root validation, no-follow-symlinks behavior, and no-match warnings remain in effect; --force skips only confirmation. No matches still means every item below the processing directory is a deletion target.

Downloads and installation

Platform Archive Matching checksum
Windows x64 (MSVC) remove-except-v0.3.0-x86_64-pc-windows-msvc.zip .zip.sha256
Linux x64 (GNU) remove-except-v0.3.0-x86_64-unknown-linux-gnu.tar.gz .tar.gz.sha256

Download the archive and its matching checksum from this Release's Assets after publication. Verify the SHA-256 before extraction. Each archive contains the executable, both READMEs, and both project licenses inside a platform-named directory. Add the executable's directory to PATH and check remove-except --version.

Archive SHA-256 values:

cbebd5b403346f178a21eca0c77cde1d1fb12cb599fca2994611b4abbe1c5d22  remove-except-v0.3.0-x86_64-pc-windows-msvc.zip
087da32c905870af88da214403566b9b5c1eafb51ef16cb77ad4c6f14e72115c  remove-except-v0.3.0-x86_64-unknown-linux-gnu.tar.gz

Verify each archive's provenance with GitHub CLI:

gh attestation verify <archive-path> --repo tresuke/remove-except --signer-workflow tresuke/remove-except/.github/workflows/prepare-release.yml --source-ref refs/tags/v0.3.0 --source-digest 3355783653a9b1242186eb17781501722ba2fd29

The archives were built from v0.3.0 at commit 3355783653a9b1242186eb17781501722ba2fd29 by Prepare Release run 40272516699, attempt 1. Both downloaded archives passed checksum and provenance verification.

cargo-auditable 0.7.7 embeds dependency crate names and versions. cargo-audit 0.22.2 audited Cargo.lock and each target binary during the workflow; independent audits of both downloaded binaries also reported no known vulnerabilities against the advisory database available on October 26, 2026. Embedded metadata, checksums, audits, and provenance do not guarantee safety. No separate SBOM or attestation file is attached.

Compatibility and verification scope

  • The package and command remain remove-except; --root, -n/--dry-run, and -f/--force are unchanged.
  • Rust 1.88 remains the minimum for source builds. Library callers can identify input-validation errors with the new public ValidationError type.
  • Linux binaries are built in Ubuntu 22.04 and require glibc 2.35 or later and the normal GNU runtime libraries (libgcc_s.so.1, libc.so.6, and the ELF loader). The downloaded binary was inspected and smoke-tested on Ubuntu 22.04.5 with glibc 2.35. Its highest directly required GLIBC symbol version is 2.34; this does not lower the supported 2.35 baseline or imply support for other distributions.
  • The release workflow passed tests on Rust 1.88.0 for Windows (133 tests including doctests) and Ubuntu 22.04 (134). All summaries reported zero failures and zero ignored tests. Symlink tests have internal early-return paths when creation is unavailable, so these summaries do not prove absence of internal skips.
  • Downloaded binaries passed version, help, full dry-run, JSON/retention checks, and confirmation smoke tests. Windows real-console confirmation passed 14 cases. The downloaded Windows executable additionally passed 13 viewer cases covering q/Escape/Ctrl+C cancellation, separate approval/rejection, queued-input disposal, dry-run, stdin patterns, resize, insufficient screen space, section cycling, grapheme wrapping, colors, and terminal-mode restoration. Four additional Windows cases passed for modifier/unsupported keys and redirected stdin during dry-run, no-removal, and destructive runs. These checks used the extracted release executable, not a rebuilt binary; its SHA-256 was b8dc9fbeefe032abe449e8a7e40333d0edee85792b0703b7b37e5c0ca7dd71d6 before and after testing and matched the archive entry. Ubuntu 22.04 PTY checks covered rejection, approval, EOF, stdin patterns, viewer cancellation, and separate confirmation after viewing, including terminal restoration. Destructive checks used dedicated temporary fixtures only. No claim of exhaustive terminal/font/OS-version coverage is made.
  • Once published, source installation is available with cargo install --git https://github.com/tresuke/remove-except --tag v0.3.0 --locked.
  • No macOS, ARM64, or musl binary, and no crates.io publication, is included. The source-only v0.2.4 Release remains unchanged.

Full changelog

v0.2.4...v0.3.0

remove-except v0.2.4

Choose a tag to compare

@tresuke tresuke released this 13 Oct 02:01
3bfbf39

remove-except v0.2.4

The first public GitHub release of remove-except, a Rust CLI that keeps selected paths or glob matches and removes other items under a chosen directory.

Features

  • Supports Windows and Ubuntu.
  • Requires Rust 1.88 or later when installing from source.
  • Use --dry-run to review kept items and deletion targets before deleting anything.
  • Normal execution shows a preview and asks for confirmation. --force skips only the confirmation prompt.
  • Symbolic links under the processing directory are treated as items and are not followed.

Install from source

cargo install --git https://github.com/tresuke/remove-except --tag v0.2.4

See the README for usage instructions and important deletion-safety guidance.

Distribution

This release provides source code only. Prebuilt binaries and a crates.io package are not included.

License

Licensed under either the MIT License or Apache License 2.0, at your option.