Skip to main content

Analyze disk usage and safely reclaim space from Docker and package-manager caches.

Project description

disktidy

A conservative, cross-platform command-line tool that analyzes where your disk space went and helps you safely reclaim it — from Docker, package manager caches, and other well-known space hogs.

It follows one rule, borrowed from good cleanup tools everywhere: looking is free and safe; anything destructive requires an explicit flag.

Why

Developer machines fill up in predictable ways: a Docker .vhdx that never shrinks, gigabytes of npm/pnpm/pip cache, bloated .git histories, Windows Store apps. disktidy finds those automatically and tells you exactly how to get the space back — instead of you hunting through folders by hand.

Install

pip install disktidy
# or, for isolation:
pipx install disktidy

Run it from source without installing:

python -m disktidy report

Quick start

# Drive overview + biggest known consumers (this is the default command)
disktidy
disktidy report

# Biggest folders under any path (add --files for biggest single files)
disktidy analyze C:\Users\me --top 20 --files

# Docker: see what's reclaimable (dry-run — nothing is deleted)
disktidy docker

# Docker: actually prune junk AND compact the virtual disk
disktidy docker --apply --compact          # (compact needs admin on Windows)

# Package caches: inspect, then clean
disktidy caches
disktidy caches --apply

# Machine-readable output for scripts/CI
disktidy report --json

Commands

Command What it does
report (default) Per-drive usage + a table of the biggest known consumers, each with a description, a reclaim command, and a safety rating.
analyze [PATH] Sizes every child folder of PATH and lists the largest; --files also finds the biggest individual files.
docker Reclaims Docker space: prunes build cache, dangling images, and stopped containers, then optionally compacts the WSL2 .vhdx.
caches Detects npm / pnpm / pip / yarn caches and cleans them on --apply.

Safety

  • Dry-run by default. docker and caches only report until you pass --apply.
  • Never touches your data. The Docker path removes build cache, dangling images, and stopped containers only — never volumes or tagged images.
  • No symlink following when sizing directories.
  • Compaction is opt-in (--compact), Windows/WSL2-only, and requires an elevated (Administrator) terminal — it stops Docker and WSL first, then runs diskpart.
  • No telemetry, no network calls.

Development

python -m pip install -e .
python -m pytest
python -m disktidy report

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

disktidy-0.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

disktidy-0.1.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file disktidy-0.1.0.tar.gz.

File metadata

  • Download URL: disktidy-0.1.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for disktidy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b82e5aa1e0788b34c2e02ebd0420feb9fa4edbf93eeb8455b31c2dd8d382a47a
MD5 ed0f89a21615e38a2db2cf50439dc722
BLAKE2b-256 aa7781bbce5fc6d0d38268c332a00879d3798dddf7321310e3b4209480414b1e

See more details on using hashes here.

File details

Details for the file disktidy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: disktidy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for disktidy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19e3f4af3d0e7646df7202e964a24d03e8b18dd612e71f97e22d64a5f05c4214
MD5 91f2f6eb9406d2e833b2293c209b00eb
BLAKE2b-256 a324dfcae30baa34433a3ba8738b14ed33f06543a7e84ce9c6148d12f2420adc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page