Duf, short for Disk Usage/Free Utility, makes disk-space checks easier to scan than raw df output by grouping devices, sorting columns, filtering filesystems, and exporting JSON when you need script-friendly data. Install Duf on Ubuntu when you want a readable terminal view that works in a desktop session, an SSH shell, or a minimal server console.
Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS all package Duf in the Universe repository. The APT workflow is the same across those releases, but the packaged version and a few newer command-line flags differ by release.
Install Duf on Ubuntu
Update Ubuntu Before Installing Duf
Refresh APT package metadata before installing Duf so Ubuntu can select the current candidate for your release.
sudo apt update
These commands use
sudofor package-management tasks. If your account does not have sudo access yet, follow the guide on add a new user to sudoers on Ubuntu first.
Confirm the Duf Package on Ubuntu
Duf comes from Ubuntu’s Universe component. Desktop installations usually have Universe enabled already, while some server, cloud, and minimal images may need it turned on before APT can find the package.
| Ubuntu release | Current APT candidate | Package source |
|---|---|---|
| Ubuntu 26.04 LTS | 0.9.1-1 | resolute/universe |
| Ubuntu 24.04 LTS | 0.8.1-1ubuntu0.24.04.3 | noble-updates/universe and noble-security/universe |
| Ubuntu 22.04 LTS | 0.6.2-1ubuntu0.1 | jammy-updates/universe and jammy-security/universe |
Launchpad’s Duf source package page for Ubuntu tracks the same package history across Ubuntu releases. Use the local APT candidate as the final source of truth because mirrors, security pockets, and update pockets can vary by release.
If APT returns
Unable to locate package duf, enable Universe first, then refresh APT and rerun the install command. The guide on enable Universe and Multiverse in Ubuntu explains the broader Ubuntu component layout.
Install Duf with APT
Install the Ubuntu package with APT:
sudo apt install -y duf
Verify Duf on Ubuntu
Check the package candidate and installed revision with apt-cache policy:
apt-cache policy duf
duf:
Installed: 0.9.1-1
Candidate: 0.9.1-1
Version table:
*** 0.9.1-1 500
500 http://au.archive.ubuntu.com/ubuntu resolute/universe amd64 Packages
100 /var/lib/dpkg/status
Your mirror hostname may differ from the example output. Ubuntu 24.04 currently reports 0.8.1-1ubuntu0.24.04.3, while Ubuntu 22.04 reports 0.6.2-1ubuntu0.1. Those releases may print duf (built from source) from duf --version, so use APT when you need the exact Ubuntu package revision.
Use Duf Commands on Ubuntu
The package name and command name are both duf, written as one word. It is separate from du -f, and it answers a mounted-filesystem question rather than the per-directory totals handled by du. The examples here use options available across Ubuntu 26.04, 24.04, and 22.04 unless the text calls out a newer-release difference.
Run Duf on Ubuntu
Start Duf without arguments when you want the normal interactive table of local, special, network, and temporary filesystems.
duf
Duf uses Unicode table borders by default. Add --style ascii when you need output that copies cleanly into plain-text notes or logs:
duf --style ascii --only-fs ext4 --output size,used,avail,usage,mountpoint
+------------------------------------------------------------------+ | 1 local device | +------------+--------+-------+--------+---------------------------+ | MOUNTED ON | SIZE | USED | AVAIL | USE% | +------------+--------+-------+--------+---------------------------+ | / | 122.5G | 10.7G | 105.5G | [##................] 8.8% | +------------+--------+-------+--------+---------------------------+
Your device names, sizes, percentages, and usage formatting will differ. Ubuntu 26.04 shows a usage bar in this trimmed example, while Ubuntu 24.04 and 22.04 show a plain percentage for the same command. The key point is the column layout and the mounted-filesystem view.
Filter Filesystem Types With Duf on Ubuntu
Use a filesystem filter when you want to focus on real storage volumes instead of every temporary mount.
duf --only-fs ext4
This keeps the table centered on ext4 volumes, which is useful when you only care about root or data partitions.
Sort and Trim Duf Output on Ubuntu
Sort the table and limit the columns when you want a cleaner health check or something easier to paste into notes.
duf --sort size --output size,used,avail,usage,mountpoint
The --output list controls both which fields appear and the order Duf shows them.
Check Inode Usage With Duf on Ubuntu
Switch to inode mode when free space still looks healthy but a filesystem may be running out of file entries.
duf --style ascii --inodes --only-fs ext4 --output inodes,inodes_used,inodes_avail,inodes_usage,mountpoint
+----------------------------------------------------------------------+ | 1 local device | +------------+---------+--------+---------+----------------------------+ | MOUNTED ON | INODES | IUSED | IAVAIL | IUSE% | +------------+---------+--------+---------+----------------------------+ | / | 8192000 | 214044 | 7977956 | [..................] 2.6% | +------------+---------+--------+---------+----------------------------+
Ubuntu 26.04 and 24.04 label inode columns as IUSED, IAVAIL, and IUSE%. Ubuntu 22.04 ships an older Duf build that labels the same inode data as USED, AVAIL, and USE%.
Export Duf Data as JSON on Ubuntu
Use JSON output when another script or monitoring tool needs filesystem data.
duf --json
Duf prints a JSON array of filesystem objects. Common fields include device, mount_point, fs_type, total, free, and used; the numeric values depend on the live system.
If you need per-directory totals instead of mounted-filesystem totals, use the du command in Linux as well. Duf and du solve different storage questions, while df remains useful for scripts and older documentation that expect traditional output.
Review Duf Help on Ubuntu
Check the local help before copying a newer Duf flag into a script.
duf --help
Ubuntu 26.04 and 24.04 include newer options such as --only-mp, --hide-mp, --avail-threshold, and --usage-threshold. Ubuntu 22.04 ships an older build without those switches. The upstream Duf project on GitHub is useful for release context, but duf --help on your own Ubuntu system is the safest source before you use release-specific flags.
Update or Remove Duf on Ubuntu
Duf stays in the normal Ubuntu package workflow, so updates and removal do not need a separate repository, service cleanup, or manual binary cleanup.
Update Duf with APT
Use APT’s single-package upgrade path when you want the newest Duf build available for your Ubuntu release without upgrading unrelated packages.
sudo apt update
sudo apt install --only-upgrade -y duf
If your system is already current, APT reports that Duf is already the newest version for that release.
Remove Duf from Ubuntu
Remove the package with APT. A normal package install and basic Duf run do not create dedicated ~/.config/duf, ~/.cache/duf, or ~/.local/share/duf directories, so package removal is usually the only Duf-specific cleanup needed.
sudo apt remove -y duf
Verify the installed package state afterward:
dpkg -l duf | grep '^ii'
No output means Duf is no longer installed. If APT reports unrelated packages as automatically installed and no longer required, review the cleanup list before removing anything else:
sudo apt autoremove --dry-run
Continue only if the preview contains packages you intentionally want to remove.
sudo apt autoremove
Troubleshoot Duf on Ubuntu
Fix Unable to Locate Package duf
The duf package lives in Universe. If the package is missing on a minimal or customized Ubuntu system, install the repository helper if needed, enable Universe, refresh APT, and install Duf again.
sudo apt install -y software-properties-common
sudo add-apt-repository universe
sudo apt update
sudo apt install -y duf
Check Duf Version Output on Ubuntu
If duf --version prints duf (built from source), the package is not broken. Some Ubuntu builds expose that upstream build string instead of the Ubuntu package revision. Confirm the installed package with APT instead:
apt-cache policy duf
Check Unsupported Duf Flags on Ubuntu
If a Duf option from an upstream example fails, compare it with the help output on your own Ubuntu release:
duf --help
For example, Ubuntu 22.04 supports core options such as --only-fs, --sort, --output, --inodes, --json, and --style, but it does not include the newer mount-point and threshold flags available on Ubuntu 26.04 and 24.04.
Conclusion
Duf on Ubuntu gives you a cleaner filesystem view than traditional df output while keeping installation, updates, and removal inside APT. For process monitoring in the same shell workflow, install htop on Ubuntu. For live throughput checks, install Bmon on Ubuntu next.


Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed in published comments:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>