DiskGrove · Electron
DiskGrove: a disk space analyzer that stays on your computer
What I built, how a scan works, and why the numbers a disk analyzer shows are harder to get right than they look.
Where did the space go?
Every developer machine fills up eventually: node_modules folders, Docker layers, build caches, old installers, a video exported twice. The question is always the same, and the tools that answer it tend to be either platform-specific or quietly connected to someone's cloud.
DiskGrove is my answer: a free, MIT-licensed disk space analyzer that runs the same way on Windows, macOS and Linux. There is no account, no telemetry and no cloud service. You can preview a file before deleting it, and nothing is opened or deleted without your confirmation.
It is built with Electron, React and TypeScript, with Vite producing the main, preload and renderer bundles and electron-builder turning them into installers.
Five ways to look at a folder
A scan produces one tree of sizes, and DiskGrove lets you read it whichever way answers your question fastest:
- a tree and a table for drilling into folders,
- a treemap for seeing at a glance which corner of the disk is heavy,
- a pie and a bar chart for comparing the children of one folder,
- and summaries by file extension, by modification age, and of the largest files.
A side pane previews the selected file: images, video, audio, PDF, text and code, CSV, Word, Excel, PowerPoint and the contents of ZIP archives, with dates, dimensions, duration and document properties. Previews are read-only and never run file content; how that is enforced is the subject of Hardening an Electron app that can delete your files.
Results can be exported as CSV, JSON or a standalone HTML report.
Search that behaves the way you expect
Search covers either the selected folder or the entire scan, and opens with Ctrl+F (⌘F on macOS). The rules are deliberately simple:
- plain text matches anywhere in a name;
- with
*or?, the whole name must match the pattern; - matching ignores case and Unicode normalization differences, so a name typed with a composed
éfinds one stored with a combining accent.
Results update while a scan is still running. Only the largest 2,000 matches are listed, together with the total count, so a search for .js across a whole drive stays responsive.
Finding duplicates without trusting a guess
Duplicate detection compares content, not names. Files are sampled first to rule candidates out cheaply, and anything that still looks identical is verified with a full-file SHA-256 hash before it is reported.
The "space you could recover" figure is labelled an estimate on purpose. Hard links, filesystem compression and reflinks can all make two files that look separate share the same blocks, so deleting one may free less than its size suggests. A disk tool that overstates savings teaches people to delete things for nothing.
What a size actually means
The hardest part of a disk analyzer is not drawing the treemap; it is deciding what to count. A few of the rules DiskGrove follows:
- Allocated size comes from the filesystem's block counts where they are available, and is otherwise estimated with 4 KiB blocks.
- Symbolic links and junctions are skipped by default. Enabling Follow links includes their targets and stops directory cycles, though shared targets may then be counted more than once.
- Virtual filesystems such as
/procand/syson Linux, and/devon macOS, are listed but not scanned unless chosen as the root: their files report sizes that are not stored anywhere. - On macOS, folders the system volume shares with
/System/Volumes/Dataare counted once, under their usual paths such as/Users. - Unreadable items are left out of the sizes but counted in the status bar; click the count to see them.
Scans are snapshots. Stopping a scan keeps the partial results, marked as partial in the status bar and the title bar, and they are not saved to recent scans. Metadata is kept in memory, at about 250 MB of RAM per million files and folders.
Try it
Installers for Windows, macOS (Apple silicon and Intel, in beta), Linux AppImage and Debian/Ubuntu are on the releases page, each with a .sha256 checksum beside it. The source, the contributing guide and the security notes are in the repository.
How those installers get built, checked and published is its own story: Shipping a desktop app to three operating systems, alone.
- DiskGrove
- Electron
- Filesystems
- Open source