Rust · ratatui · terminal-native

See every byte.
Reclaim your disk.

disktree-tui (dtui) is a keyboard-first disk-space explorer with a nested treemap. Scan millions of files, spot what is large, and send it to the Trash — without ever leaving your terminal.

v0.1.0MIT licensedLinux & macOSsingle binary

2.6M
files in the demo scan
< 1 ms
to lay out 240 tiles
3
levels of nested treemap
100%
reachable from the keyboard

Why dtui

Built for the terminal you already live in.

No Electron, no background daemon, no waiting on a GUI. One binary, a fast parallel scan, and a map that stays responsive even on enormous directories.

A treemap that makes sense

Squarified tiles sized by real disk usage, nested up to three levels deep. Zoom, pan, and fit — tiles stay square and readable, never stripey.

Scans in the background

A parallel scanner streams live progress into a temporary SQLite index. The UI only ever draws a bounded page, so a million files will not freeze it.

Keyboard-first, mouse-optional

Vim-style hjkl, spatial arrow navigation, clickable tiles and breadcrumbs, right-click menus, and wheel zoom. Every control is reachable both ways.

Review before you remove

Marking never deletes. R lists every marked path with its full size, and each item is re-validated by device, inode, size, mtime, and kind right before it is touched.

Trash is the default

One Enter moves the reviewed items to the system Trash. Permanent deletion requires typing DELETE, and emptying the Trash requires EMPTY.

Fits your setup

Four themes, size or category colors, ASCII fallback, NO_COLOR support, and responsive layouts for narrow terminals. Your terminal, your rules.

The loop

From curiosity to free space, in five steps.

A deliberately small workflow: look, mark, review, remove. Nothing destructive happens until you have seen every path.

  1. 01dtui ~/projects

    Scan

    Point it at any directory. It walks the tree in parallel and reports live progress, bytes, and unreadable paths.

  2. 02hjkl · Enter

    Browse

    Move spatially through the treemap, open folders, zoom in, switch to list view, and filter direct children live.

  3. 03Space

    Mark

    Flag the things you no longer need. Marks are just marks — a count and a running total, nothing more.

  4. 04R

    Review

    See every marked path, its size, the total, and the file count. Exclude anything you changed your mind about.

  5. 05Enter · D

    Remove

    Enter sends items to Trash. Permanent deletion is a separate, typed confirmation — never a single keypress.

Muscle memory

The keys you will use most.

Everything is discoverable with ? inside the app. Here is the short version — the full keymap lives in the user guide.

Full keymap
↑↓←→ / hjkl
Move the selection
Enter
Open the selected folder
Backspace
Go to the parent folder
Alt + ← →
History back / forward
g / G
Jump to first / last
+ / − / 0
Zoom in / out / fit

Safety model

Deletion is the slow path, on purpose.

A disk cleaner should be boring at the moment it matters. Disktree-TUI treats removal as a reviewed plan, not a keystroke.

Read the full safety model
  • Marks never delete. They only record intent, with a running count and total size.
  • Every item is re-checked. Device, inode, size, mtime, and kind must match the scan, or the whole plan aborts.
  • No symlink following, no mount crossing. Ancestors are validated so a swapped symlink cannot escape.
  • Trash failures never fall back to deletion. If Trash is unavailable, the file stays where it is.
  • Overlaps are refused. The scan root cannot be marked, and marking a parent replaces its marked descendants.

Get started

One binary. No runtime.

Install a prebuilt release in seconds, or build from source with Cargo. Linux and macOS are supported.

install
$ curl -fsSL \
  https://raw.githubusercontent.com/liyu1981/disktree-tui/main/scripts/install.sh \
  | bash

Detects your OS and architecture, downloads the matching release asset, and installs dtui to ~/.local/bin. Make sure that directory is on your PATH.

try it
$ dtui ~/projects

Or run dtui with no argument to resume the last path, then press ? for help.

Go deeper

Documentation for users and tinkerers.