Skip to main content

duBE — du But Easier

CI PyPI version License: MIT GitHub stars

Find what is eating your disk in one command. duBE is a friendlier du: cumulative sizes, percentage bars, a tree view, top-N, human-friendly filters and JSON output — with the same totals as du.


✨ Features

  • 📊 Percentage bars — see at a glance which directory dominates
  • 🏆 Top-N — dube / --top 10 lists the biggest offenders, nothing else
  • 🌲 Tree view — directory hierarchy with cumulative sizes per branch
  • 🎯 Human filters — --threshold 100M, --exclude node_modules, --exclude '*.iso', -z
  • ✅ Accurate like du — cumulative sizes, hard links counted once, symlink loops detected
  • 🧭 Depth control — --max-depth limits what is shown, never what is counted
  • 🤖 JSON output — sizes in bytes for scripts and monitoring
  • 🔇 Script-friendly — plain output when piped, warnings on stderr, NO_COLOR support

📥 Installation

pip install dube

Or from source:

git clone https://github.com/serber1990/duBE.git
cd duBE
pip install -e .

🎨 Examples

Biggest entries

dube project --top 5
  ╔══════════════════════════════════════════════╗
  ║  duBE  ·  /home/user/project                 ║
  ╚══════════════════════════════════════════════╝

      1.3 GB  ████████░░░░  66.0%  project/logs/
    479.0 MB  ███░░░░░░░░░  24.3%  project/node_modules/
    312.0 MB  ██░░░░░░░░░░  15.8%  project/node_modules/typescript/
    188.0 MB  █░░░░░░░░░░░   9.5%  project/.git/
    188.0 MB  █░░░░░░░░░░░   9.5%  project/.git/objects/
  ────────────────────────────────────────────────────────────────────────
      1.9 GB  Total  project

Tree view

dube project --tree --max-depth 2
  ╔══════════════════════════════════════════════╗
  ║  duBE  ·  /home/user/project  ·  tree        ║
  ╚══════════════════════════════════════════════╝

      1.9 GB  project
    188.0 MB  ├── .git/
    188.0 MB  │   └── objects/
      2.3 MB  ├── dist/
      1.3 GB  ├── logs/
    479.0 MB  ├── node_modules/
     21.0 MB  │   ├── react/
    312.0 MB  │   ├── typescript/
    146.0 MB  │   └── webpack/
    730.1 KB  └── src/
    640.1 KB      └── components/
  ────────────────────────────────────────────────────────────────────────
      1.9 GB  Total  project

More

dube /var/log --sort desc --time          # largest first, with modification dates
dube /home -a --threshold 1G              # every file or directory of 1 GB or more
dube / -x --top 20                        # stay on the root filesystem
dube . --exclude node_modules --exclude .git
dube /srv --json | jq '.entries[] | select(.size > 1e9) | .path'

🛠 Options

Option Description
directory Directory to analyse (default: .)
-n, --top N Show only the N largest entries
-t, --tree Show a tree with cumulative sizes
-d, --max-depth N Only show entries up to N levels deep (totals still include everything)
-a, --all Include individual files
--sort asc|desc Sort by size (default: by path)
--threshold SIZE Only entries ≥ SIZE (100M, 1.5G); negative = ≤ |SIZE|
-z, --exclude-zero Hide zero-size entries
--exclude PATTERN Skip a path (/var/cache) or name pattern (node_modules, *.iso). Repeatable
--no-default-excludes Also scan /proc, /sys, /dev, /run, /mnt, /media, /lost+found
--apparent-size Use file sizes instead of disk blocks used
-L, --follow-symlinks Follow symbolic links (loops are detected)
-x, --same-filesystem Do not cross into other mounted filesystems
--time / --time-style FMT Show modification time (iso, long-iso, full-iso, +%d/%m/%Y)
--json JSON output, sizes in bytes
--block-size BYTES Unit for plain --threshold numbers (default 1024)
-v, --version Show version

Directories that cannot be read are counted and reported on stderr — run with sudo for complete totals.


🧪 Development

pip install -e ".[dev]"
ruff check .
pytest

See CHANGELOG.md for release notes.


📝 License

MIT — see LICENSE.


💬 Feedback

Open an issue or reach out via GitHub.

🌐 Connect

GitHub

Release files for dube 2.1.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 dube 2.1.0
File Size Uploaded
dube-2.1.0.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dube 2.1.0
File Interpreter ABI Platform
dube-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / dube-2.1.0.tar.gz

Download URL dube-2.1.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f39b492b54c0a94c8f028a6a44b5a552ae400c242213d1bdacfb08a130ecb1e3
BLAKE2b-256 checksum
How to use checksums
5f0c66db1de9edc27ec7d7e2f204600dea1065e6eff208f5190fda31f0a7e574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / dube-2.1.0-py3-none-any.whl

Download URL dube-2.1.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f53a2667d60f26c370371ac65526816e9a74b02bac7bdb80fea0647f3dd96c0e
BLAKE2b-256 checksum
How to use checksums
a8b009fc13ef218e7f468c6ff0c1b3db4941e01cfbd4a6f6119b2c9563605fc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 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