Table of Contents
- ncdu (NCurses Disk Usage Analyzer)
- Filelight
- Baobab (Disk Usage Analyzer)
- QDirStat
- gdu (Go Disk Usage Analyzer)
- duc (Disk Usage Cache)
- Bonus: Enhancing
dfandduwith Visualization Tips - Tool Comparison Table
- Conclusion
- References
1. ncdu (NCurses Disk Usage Analyzer)
What is ncdu?
ncdu (NCurses Disk Usage) is a lightweight, terminal-based tool that transforms the output of du (disk usage) into an interactive, navigable interface. Built on the ncurses library, it’s designed for systems without a GUI (e.g., servers) but works equally well on desktop environments.
Key Features
- Interactive Navigation: Use arrow keys to drill into directories and explore nested files.
- Detailed Metrics: Displays size (bytes, KB, MB, GB), percentage of total disk space, and file/directory names.
- File Management: Delete files/directories directly from the interface (with confirmation prompts).
- Speed: Scans directories quickly, even on large filesystems.
Installation
ncdu is pre-packaged for most Linux distributions:
- Ubuntu/Debian:
sudo apt install ncdu - Fedora/RHEL:
sudo dnf install ncdu - Arch Linux:
sudo pacman -S ncdu
Usage Example
To analyze disk usage for a specific directory (e.g., /home), run:
ncdu /home
Navigation Tips:
- Use ↑/↓ arrow keys to move between entries.
- Press → to drill into a directory, ← to go back.
- Press
dto delete a file/directory (confirm withy). - Press
qto quit.

ncdu interface showing disk usage for a /home directory.
Pros and Cons
| Pros | Cons |
|---|---|
| Lightweight (no GUI dependencies) | Terminal-only; less visually intuitive for some users. |
| Fast and efficient for large directories | Limited to text-based interaction. |
| Works over SSH (great for remote servers) | No built-in search (use du with grep for pre-scan filtering). |
2. Filelight
What is Filelight?
Filelight is a graphical disk usage analyzer designed for the KDE desktop environment. It uses a sunburst chart (a circular, nested ring visualization) to represent disk usage, where larger segments correspond to larger files/directories.
Key Features
- Sunburst Visualization: Rings represent nested directories; hover over segments to see details (size, path).
- Interactive Controls: Click segments to zoom in, right-click to delete/move files, or search for specific items.
- KDE Integration: Seamlessly works with KDE Plasma, including context menus and file associations.
Installation
- Ubuntu/Debian:
sudo apt install filelight - Fedora/RHEL:
sudo dnf install filelight - Arch Linux:
sudo pacman -S filelight - KDE Users: Often pre-installed with KDE Plasma.
Usage Example
Launch Filelight from your application menu, then:
- Click “Scan” and select a directory (e.g.,
/for the entire system). - Explore the sunburst chart: Larger, brighter segments indicate bigger files/directories.
- Right-click a segment to delete, copy, or open the directory in Dolphin (KDE’s file manager).

Filelight’s sunburst chart visualizing disk usage.
Pros and Cons
| Pros | Cons |
|---|---|
| Visually striking sunburst chart | Heavy KDE dependencies (may bloat non-KDE systems). |
| Intuitive for identifying large files at a glance | Slower than terminal tools on very large directories. |
| Built-in file operations (delete, move) | Limited to GUI environments. |
3. Baobab (Disk Usage Analyzer)
What is Baobab?
Baobab (also called “Disk Usage Analyzer”) is the default disk visualization tool for the GNOME desktop environment. It offers two primary views: a treemap (rectangular blocks, with size proportional to disk usage) and a ring chart (similar to Filelight’s sunburst).
Key Features
- Treemap/Ring Views: Toggle between two visualizations to suit your preference.
- Remote Scanning: Analyze disk usage on network shares (e.g., SSH, FTP) or external drives.
- Snapshot Comparison: Save scans as snapshots and compare them to track usage over time.
- Search: Filter results by file name or size.
Installation
- Ubuntu/Debian:
sudo apt install baobab(often pre-installed on GNOME). - Fedora/RHEL:
sudo dnf install baobab - Arch Linux:
sudo pacman -S baobab
Usage Example
- Launch Baobab from the GNOME menu (search for “Disk Usage Analyzer”).
- Click “Scan Folder” and select a directory (e.g.,
/varfor system logs). - Use the dropdown to switch between “Treemap” and “Ring” views.
- Double-click a block/segment to drill into subdirectories.

Baobab’s treemap view showing disk usage in /var.
Pros and Cons
| Pros | Cons |
|---|---|
| Native GNOME integration | Less feature-rich than QDirStat (e.g., no bulk cleanup tools). |
| Dual visualization modes | Slower than ncdu or gdu for large scans. |
| Remote and snapshot support | Limited to GUI environments. |
4. QDirStat
What is QDirStat?
QDirStat is a cross-platform GUI tool inspired by WinDirStat (a popular Windows disk analyzer). It uses a treemap visualization with color-coded file types (e.g., red for video, blue for documents) to make it easy to identify file categories consuming space.
Key Features
- Treemap with File Type Colors: Rectangles are colored by file extension (configurable).
- Detailed File List: Side panel shows sorted list of files by size, with path and permissions.
- Bulk Cleanup: Built-in tools to delete, compress, or move large files.
- Exclusion Rules: Ignore temporary files, cache directories, or specific file types during scans.
Installation
- Ubuntu/Debian:
sudo apt install qdirstat - Fedora/RHEL:
sudo dnf install qdirstat - Arch Linux:
sudo pacman -S qdirstat - Source: GitHub (for other distros).
Usage Example
- Launch QDirStat and select a directory to scan (e.g.,
/). - The treemap displays directories as nested rectangles; hover to see size and path.
- Use the “Cleanup” menu to delete files, or right-click entries for context actions.

QDirStat’s treemap with color-coded file types.
Pros and Cons
| Pros | Cons |
|---|---|
| Color-coded file types for quick identification | Requires Qt dependencies (may be large on minimal systems). |
| Powerful cleanup tools | Slower than terminal tools for initial scans. |
| Cross-platform (works on Linux, Windows, macOS) | No ring/sunburst view (treemap only). |
5. gdu (Go Disk Usage Analyzer)
What is gdu?
gdu (Go Disk Usage) is a modern, terminal-based alternative to ncdu, written in Go for speed and efficiency. It’s designed to handle large directories faster than ncdu by leveraging concurrency and optimized I/O operations.
Key Features
- Speed: Up to 5x faster than
ncduon large filesystems (e.g., 1TB+ drives). - Interactive UI: Similar to
ncdu(arrow keys for navigation, delete withd). - JSON Output: Export results to JSON for scripting or external analysis.
- Lightweight: Minimal dependencies (only requires Go runtime).
Installation
gdu is available via package managers or binary downloads:
- Ubuntu/Debian:
sudo apt install gdu(via PPA for older versions). - Fedora/RHEL:
sudo dnf install gdu - Arch Linux:
sudo pacman -S gdu - Binary: Download from GitHub Releases.
Usage Example
To scan the root filesystem:
sudo gdu /
Key Shortcuts:
Tab: Switch between “size” and “usage” (percentage) views.Ctrl+L: Refresh the scan.?: Show help menu.

gdu’s terminal interface, showing faster scan times than ncdu.
Pros and Cons
| Pros | Cons |
|---|---|
Faster than ncdu for large directories | Less mature than ncdu (fewer plugins/community support). |
| JSON output for automation | Terminal-only. |
| Lightweight and portable | No GUI option. |
6. duc (Disk Usage Cache)
What is duc?
duc (Disk Usage Cache) is a unique tool that precomputes and caches disk usage data for fast subsequent scans. Instead of scanning the filesystem every time, it builds an index (stored in ~/.duc.db) that can be queried instantly.
Key Features
- Cached Scans: Index directories once, then query the cache for instant results.
- Multiple Interfaces: Supports terminal (ncurses), GUI (GTK), and web-based visualization.
- Incremental Updates: Update the cache without re-scanning the entire directory.
- Export Options: Generate HTML reports or PNG/SVG visualizations.
Installation
- Ubuntu/Debian:
sudo apt install duc(via universe repo). - Fedora/RHEL:
sudo dnf install duc - Arch Linux:
sudo pacman -S duc
Usage Example
- Build an index for
/home:duc index /home - Query the cache with a terminal interface:
duc ui /home - Generate an HTML report:
duc report /home > disk_usage.html

Sample HTML report generated by duc.
Pros and Cons
| Pros | Cons |
|---|---|
| Blazing-fast queries after initial index | Requires manual index updates (not real-time). |
| Multiple output formats (terminal, GUI, web) | Initial index scan can be slow on large directories. |
| Lightweight cache (uses minimal disk space) | Less intuitive than GUI tools for casual users. |
7. Bonus: Enhancing df and du with Visualization Tips
While df and du are not visual tools, you can combine them with command-line utilities to add context. Here are some useful tricks:
1. Sort du Output by Size
List the 20 largest files/directories in /var:
du -a /var | sort -n -r | head -20
-a: Show all files (not just directories).-n -r: Sort numerically in reverse order (largest first).
2. Human-Readable df with sort
Show disk usage by mounted volume, sorted by size:
df -h | sort -k5 -h
-h: Human-readable (GB, MB).-k5 -h: Sort by the 5th column (used space) numerically.
3. Generate a Simple Bar Chart with gnuplot
For a basic visual, pipe du output to gnuplot:
du -sh /home/* | awk '{print $1, $2}' | gnuplot -p -e "set terminal dumb; set title 'Disk Usage'; plot '-' using 1:xtic(2) with boxes"
This generates an ASCII bar chart in the terminal.
8. Tool Comparison Table
| Tool | Type | Visualization | Speed | Best For |
|---|---|---|---|---|
ncdu | CLI | Text-based tree | Fast | Servers, minimal systems, SSH environments |
| Filelight | GUI | Sunburst (ring) | Moderate | KDE desktop users, circular visual fans |
| Baobab | GUI | Treemap/ring | Moderate | GNOME desktop users, remote scans |
| QDirStat | GUI | Treemap (color-coded) | Moderate | File type analysis, bulk cleanup |
gdu | CLI | Text-based tree | Very Fast | Large directories, performance-focused |
duc | CLI/GUI | Cache + multiple | Fast (cached) | Repeated scans, reporting/scripting |
9. Conclusion
Choosing the right disk usage visualization tool depends on your workflow:
- Terminal/Server Users: Opt for
ncdu(mature, widely available) orgdu(faster for large data). - Desktop Users: Use Filelight (KDE), Baobab (GNOME), or QDirStat (color-coded file types).
- Repeated Scans/Reporting:
duc’s cached indexes save time for frequent analysis.
All these tools transform raw disk usage data into actionable insights, making it easier to free up space and keep your Linux system running smoothly.