Disktree: The GPU Disk Map That Turns Cleanup Into Triage

A Rust and GPUI treemap analyzer that makes hidden bloat visible, classifies reclaimable space, and stays responsive on messy developer machines.

9 min read • View on GitHub • More from tobi

A wide desktop scene shows a treemap window occupying most of the frame, with large rectangles standing in for caches, build artifacts, sandboxes, and worktrees. A small side panel lists a few items marked for review, explaining that the tool is not just measuring disk usage but helping decide what can be removed safely.
Disktree treats disk cleanup like a map of decisions, not a pile of files.
Key Takeaways

Cleanup, Reframed as a Map

Most disk tools answer a blunt question: what is big? Disktree asks a better one: what is big and likely safe to delete? That shift changes the whole experience. Instead of a terminal chore, you get a visual triage board for the mess left behind by modern developer workflows.

That matters because the bloat is no longer just old downloads and forgotten backups. It is caches, sandboxes, generated artifacts, repeated worktrees, and the residue of AI-assisted coding sessions. Disktree makes that clutter legible in one view, then keeps the cleanup loop fast enough that you can keep exploring instead of waiting for a scan to finish.

Was wondering where my disk space went. Therefore this exists now. You can simply wish software into existence.

Tobias Lütke, Creator of Disktree / CEO of Shopify · tobi/disktree — GitHub trending stats & insights

Why This Exists Now

Disktree is shaped by a very specific moment. Developer machines are accumulating more junk than ever, and a lot of it is temporary by design. Large language model workflows, repeated package installs, and local build systems all leave behind space that is easy to overlook until the disk is suddenly full.

The repo also reflects the Omarchy worldview: keyboard-first, opinionated, and built around a polished workflow rather than a bare utility. That combination makes the project feel less like a traditional sysadmin tool and more like part of a curated desktop stack.

A close-up engraving-style scene shows a treemap being assembled on a workbench. Rectangles are arranged into rows, one row grows too awkward, then the layout starts a new row. Tiny scraps are swept into a single compact tile labeled by their visual role, showing how small files are grouped so the map stays readable.
Squarified layout keeps the map readable by refusing to turn small files into visual noise.

The Core Trick: Size Is Not the Same as Value

Disktree’s key move is to store more than one idea of size. A node carries subtree totals and direct figures, so the interface can answer different questions without recomputing the whole tree. That is the difference between a tool that merely reports disk usage and one that supports judgment.

The project also introduces a reclaimability layer. A folder can be large because it contains important work, or large because it is mostly disposable buildup. Disktree treats those cases differently, which is exactly why it is useful for cleanup instead of just measurement.

In practice, that means the treemap is doing editorial work. It does not just show magnitude. It surfaces likely candidates for deletion, then lets the user inspect them before any removal happens.

How Disktree Keeps the Tree Fast

The responsive feel comes from a pipeline that can scan in parallel, aggregate cleanly, and stop when the user changes their mind.

The core crate is built like infrastructure, not a UI toy. Filesystem crawling happens in parallel with Rayon, so the scanner can fan out across directories without turning the UI into a waiting room. Hardlinks are deduplicated, subtree totals are accumulated, and the scan can be canceled cooperatively when the user moves on.

That last detail matters. A disk analyzer is only pleasant if it respects interruption. Disktree can stop a live scan, preserve responsiveness, and let the user pivot without paying for the full traversal every time.

// Conceptual shape of the data model
struct Node {
    name: String,
    bytes: u64,       // total bytes in subtree
    files: u64,
    own_bytes: u64,    // bytes directly in this node
    reclaim: bool,
    children: Vec<Node>,
}

// UI can switch between total and direct views
let display_bytes = if mode == Mode::Total {
    node.bytes
} else {
    node.own_bytes
};

Why the Layout Matters

Disktree uses a squarified treemap, not a slice-and-dice view. That choice is the reason the screen stays readable when the tree gets deep. Long slivers are hard to compare, while balanced rectangles let your eyes estimate size much faster.

ToolPrimary interfaceLayout typePlatform scopeCleanup guidanceOpen source or commercial
DisktreeGPU treemap appSquarified treemapLinux, macOS, WindowsReclaimability cues and review flowOpen source
ncduTerminal browserIndented listCross-platform terminalManual inspectionOpen source
QDirStat / KDirStatDesktop appTreemapLinux desktopStrong visual inspectionOpen source
GrandPerspectiveDesktop appTreemapmacOSManual cleanup workflowOpen source
DaisyDiskDesktop appSunburst mapmacOSPolished guided cleanupCommercial
dua-cliTerminal CLIList and tree viewsCross-platform terminalFast command-line triageOpen source

The important part is not that Disktree looks nicer. It is that the layout preserves decision quality at scale. A good treemap does not merely compress data. It keeps the shape of the problem legible.

A Modern System Tool, Not a Terminal Clone

Against older disk tools, Disktree lands in a different category. It keeps the precision and trustworthiness you expect from system software, but it presents the result as a modern interactive workspace. That is where GPUI matters. The app can stay fluid while rendering a dense structure that would feel sluggish in a more traditional UI stack.

The result is a tool that feels aligned with modern developer habits. It is visual enough to explain where the bytes went, fast enough to live with, and opinionated enough to steer you toward action instead of just data. That is why it reads more like a product than a utility wrapper.

ProjectWhat it is best atWhy it differs from Disktree
ncduKeyboard-first terminal triageNo graphical treemap and no GPU-accelerated interface
QDirStat / KDirStatClassic nested mosaic inspectionOlder desktop stack and less modern interaction model
GrandPerspectiveMac treemap cleanupmacOS-only and less developer-workflow focused
DaisyDiskPolished commercial cleanupBeautiful, but not open source and not built around the Omarchy workflow
dua-cliFast terminal summariesExcellent CLI, but not an interactive visual decision surface

What the Workspace Tells You

The repository layout says a lot about the project’s intent. Core logic is separated from the app layer, which keeps the filesystem engine testable and the UI free to move quickly. The `xtask` crate handles build and packaging chores, which is a strong sign that the repo is designed like a product pipeline, not a one-off script collection.

That split also makes the architecture easier to trust. The dangerous parts live in a focused core. The visual parts live in a frontend that can evolve independently. The repo feels engineered for longevity, not just a splashy launch.