ncdu as a Linux alternative to TreeSize Free
Updated
Our verdict
ncdu is a solid replacement for TreeSize Free for users who are comfortable with the terminal. It provides an interactive, keyboard‑driven tree view, sorts by size automatically, and can save scans for later. It is ideal for system administrators, developers, and power users who need quick disk‑usage insights or want to script the process. However, it lacks a graphical interface and the ability to directly open TreeSize Free’s proprietary report files, so users who rely on a GUI or need to share reports with non‑Linux colleagues may find it less convenient.
- License
- GPL-3.0
- Price
- Free
- Latest version
- 2.11.1
- Rating
- —
What works the same
- Both display folder sizes in a hierarchical tree view
- Both allow sorting by size
- Both support exporting or copying results to a file
- Both can be used in scripts (ncdu has a quick‑scan mode)
What is different
- ncdu is terminal‑based; TreeSize Free is GUI
- ncdu cannot open TreeSize Free’s .tsf files; export format differs
- TreeSize Free offers more filtering options (e.g., by file type)
- TreeSize Free can scan network shares via SMB without extra setup
- ncdu requires a terminal emulator, not a full desktop environment
Opening your TreeSize Free files
TreeSize Free stores reports in its own .tsf binary format, which ncdu cannot read. To migrate, export the TreeSize report to CSV or plain text from Windows, then import that text into ncdu or use a third‑party conversion tool. If you only need the data, copy the exported file to Linux and run ncdu on the same directories to regenerate the tree view.
Switching from TreeSize Free to ncdu, step by step
- Export the TreeSize Free report to CSV or plain text on Windows.
- Transfer the exported file to the Linux machine via SCP or USB.
- Open the file with a text editor to confirm the format.
- Run ncdu on the target directories to generate a new tree view.
- Save the ncdu scan if you want to revisit it later.
- Share the CSV or plain text report with colleagues if needed.
Key features of ncdu
- Interactive tree view of directory sizes
- Sorts directories by size by default
- Fast scanning with low memory footprint
- Supports analyzing remote directories via SSH
- Can save and load scan results for later review
- Keyboard-driven navigation without mouse
- Shows file count and total size per directory
- Runs in any standard terminal emulator
How to install ncdu on Linux
sudo apt install ncdusudo apt install ncdusudo dnf install ncdusudo pacman -S ncdusudo zypper install ncduFrequently asked questions
Can I use ncdu in scripts to get a quick size summary?
Yes, run ncdu -o- /path | grep -E '^\s*\d+' to output a simple list of sizes. The -o flag writes the scan to a file, and -q suppresses the interactive UI for scripting.
Does ncdu support remote directories via SSH?
Yes, mount the remote directory with SSHFS or run ncdu directly on a remote host via SSH: ssh user@host 'ncdu -o- /remote/path'.
Is there a way to export ncdu results to a CSV file?
ncdu can save scans in its own binary format with -o, but to get CSV you need to parse the output or use ncdu --export (available in newer versions) which writes a plain‑text tree that can be converted to CSV with a simple script.