Skip to main content

tidytrail

Fast, safe disk-usage scanning and audited cleanup, from Python or the command line. Built for servers and automation: no GUI, no desktop session needed.

tidytrail is powered by the same Rust core as TidyTrail Desktop, so what it considers safe to delete is identical whether you click, script, or run a cron job.

pip install tidytrail

Prebuilt wheels for Windows, Linux (x86_64, aarch64) and macOS (Intel and Apple Silicon); Python 3.10+.

Command line

# What's using the space?
tidytrail scan /var/log
tidytrail scan /data --dirs --top 10      # include folders
tidytrail scan /data --json               # for scripts / monitoring

# Preview a cleanup: checked and audited, nothing is moved
tidytrail trash --root /var/log --dry-run /var/log/app/old.log.1

# Do it (asks for confirmation when run interactively)
tidytrail trash --root /var/log /var/log/app/old.log.1

# Unattended (cron/CI): --yes is required, paths can come from a file or stdin
find /var/log/app -name '*.log.*' -mtime +30 \
  | tidytrail trash --root /var/log/app --yes --from-file -

Exit codes: 0 success, 1 some paths were refused or failed, 2 usage error or nothing done, 130 interrupted.

Python

import tidytrail

result = tidytrail.scan("/var/log")           # GIL released; Ctrl+C works
print(tidytrail.format_bytes(result.root.size))
for node in tidytrail.largest(result.root, 10):
    print(tidytrail.format_bytes(node.size), node.path)

cleaner = tidytrail.Cleaner("/var/log/app")   # only paths inside this folder
cleaner.check("/var/log/app/old.log.1")       # PermissionError if refused
report = cleaner.trash(["/var/log/app/old.log.1"], dry_run=True)
print(report.trashed, report.failed, report.audit_log)

Safety model

  • Deletes go to the OS trash (Recycle Bin / freedesktop Trash), never a hard delete. Note that space is only freed when the trash is emptied.
  • Only inside the root you name. Every path is re-checked in Rust: it must resolve, through its real parent directory, strictly inside --root / scan_root, so .. and symlinked parents can't escape.
  • Protected locations are never deleted, even inside the root: OS directories (C:\Windows, /usr, /etc, /boot, /var/lib, ...) and everything in them, plus volume roots, Program Files, profile roots, /home, /var, /var/log, /opt, /srv themselves.
  • Every attempt is audited (trashed, refused, failed, or dry run) as JSON Lines in deletions.jsonl: $TIDYTRAIL_AUDIT_LOG_DIR, else %LOCALAPPDATA%\tidytrail\logs (Windows), ~/Library/Logs/tidytrail (macOS), ~/.local/state/tidytrail (Linux). If it can't be written, nothing is deleted. On Unix the log is created owner-readable only.
  • Scans never follow symlinks or junctions, skip Linux pseudo-filesystems like /proc, and report unreadable paths instead of failing.

Run it as the least-privileged account that can see the data. See SECURITY.md for the full threat model and how to report a vulnerability.

Verifying what you install

Releases are published from GitHub Actions with PyPI Trusted Publishing, so each file carries a signed PEP 740 attestation linking it to the exact workflow run that built it (shown on the PyPI file page as "Verified").

License

MIT

Metadata

Release files for tidytrail 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tidytrail 0.2.0
File Size Uploaded
tidytrail-0.2.0.tar.gz 61.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tidytrail 0.2.0
File
tidytrail-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
tidytrail-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
tidytrail-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
tidytrail-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
tidytrail-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 1.6 MB

Release files / tidytrail-0.2.0.tar.gz

Download URL tidytrail-0.2.0.tar.gz
Size 61.3 kB
Tags Source
SHA-256 checksum
How to use checksums
da6860d487b4161c5ffd9c83853d83452220e19742962841370859d3491327f7
BLAKE2b-256 checksum
How to use checksums
7b67a3be759600aa6c1ef1f7e29715b051a268071c0d53d16f721302eb6fbc44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / tidytrail-0.2.0-cp310-abi3-win_amd64.whl

Download URL tidytrail-0.2.0-cp310-abi3-win_amd64.whl
Size 225.2 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
abe783e173b9c2b6c652e2051c367106cd55a0bc5f29dde54877de67ee16f22b
BLAKE2b-256 checksum
How to use checksums
ec912b779fe06154d09fa91e0b7da16d6d958023e31d18bda55474a269ccb307
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / tidytrail-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tidytrail-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 381.3 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
2d6c6e665841b0c4837cfc914d38accbf3d4a18d3cb295787f8ca5c2e03b64ae
BLAKE2b-256 checksum
How to use checksums
8ee0f6c37ee0e8585ee644906db1e1f553910b80f39364ac4196487767f51a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / tidytrail-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL tidytrail-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 363.7 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
1571137b240b15768765b5fa79bc249f0dda48ca6d467c64c9a18423c86d0a00
BLAKE2b-256 checksum
How to use checksums
6cfc1186e74b16de3bd4abd8aa4c6202058693ed9f9b76002bf4b2c86379eb55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / tidytrail-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL tidytrail-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 305.7 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8f8233bfb8d0ed847b70b38f3e726bc9b315f5724db8eec7e032e77c06b9856a
BLAKE2b-256 checksum
How to use checksums
311be00c6581697cd66b194ff0f95916132256721f107b076d51b5039d63f9dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / tidytrail-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL tidytrail-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 307.9 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ed6bfcef586107826ae6ac759d8c33277dcb5b98b7f084e156aa9f10359ff6a3
BLAKE2b-256 checksum
How to use checksums
3a2c229afdda4dcff2c497a5e8b825369f8930947ba702f92fa6c7748edb65b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page