Qdirstat shows how much space Arch Linux uses for packages, build files and logs. Scan your home directory to find AUR build caches, then check the pacman cache and system journal separately. Keeping those scans separate makes it easier to see which files belong to your account and which are maintained by system tools.
This article covers installation from the AUR, updates after Qt changes, and the package view that reads pacman data. It also explains which directories to examine before cleanup and why dedicated package and log tools should handle changes to managed files without deleting package data by hand.
How Qdirstat Is Packaged for Arch Linux
Unlike some distributions, Arch does not carry Qdirstat in its official repositories. Instead, Qdirstat is maintained in the Arch User Repository (AUR), where community members publish build recipes called PKGBUILDs. Three Qdirstat packages are commonly found there:
qdirstatbuilds the latest stable Qdirstat release. At the time of writing it follows Qdirstat 2.0 and depends onqt6-baseandqt6-5compat.qdirstat-gitbuilds directly from the development branch for those who want the newest changes.qdirstat-binrepackages a prebuilt binary, avoiding compilation time.
For most Arch users the stable qdirstat package is the right choice. It balances freshness with the reliability of a tagged release, and it rebuilds cleanly against current Qt 6 libraries. Our separate Qdirstat AUR guide explains the three packages in greater depth.
Installing Qdirstat on Arch
Update the System First
Arch expects a fully updated system before building new packages, because AUR packages compile against the libraries currently installed. Begin with a full upgrade:
sudo pacman -Syu
Option 1: Use an AUR Helper
If you already use an AUR helper such as yay or paru, installation takes one command:
yay -S qdirstat
# or
paru -S qdirstat
The helper downloads the PKGBUILD, shows it for review, installs build dependencies, compiles Qdirstat and installs the finished package with pacman.
Option 2: Build Manually with makepkg
Building by hand is the traditional Arch approach and needs only git and the base-devel group:
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/qdirstat.git
cd qdirstat
less PKGBUILD
makepkg -si
Reading the PKGBUILD before building is an essential habit. It shows exactly where the source comes from and what commands will run. For Qdirstat, you should see the source downloaded from the official GitHub repository and a standard Qt build.
Launch Qdirstat
After installation, Qdirstat appears in your application menu. You can also start it from a terminal and pass a starting directory:
qdirstat ~
Arch-Specific Places Worth Scanning
The Pacman Package Cache
Pacman keeps every downloaded package in /var/cache/pacman/pkg. On a system that has been updated for a year or two, this directory can grow to many gigabytes. Scan /var with Qdirstat and the cache usually stands out as a large uniform block of archive-coloured rectangles.
Do not delete the cache contents directly from Qdirstat. Use the dedicated tool instead, which keeps a few recent versions for safe downgrades:
sudo pacman -S pacman-contrib
sudo paccache -r # keep the last three versions
sudo paccache -ruk0 # remove all cached versions of uninstalled packages
AUR Helper Build Directories
AUR helpers store cloned repositories and build files, usually in ~/.cache/yay or ~/.cache/paru. Large packages such as browsers or kernels can leave behind hundreds of megabytes each. Qdirstat makes these directories easy to spot inside your home cache, and they are generally safe to clear once packages are installed.
The Systemd Journal
Logs collected by systemd live in /var/log/journal. If a service misbehaves and logs heavily, this folder can grow quickly. Rather than deleting files, trim the journal properly:
sudo journalctl --vacuum-size=500M
Btrfs Snapshots
Many Arch users run Btrfs with Snapper or Timeshift. Snapshot directories can confuse any disk analyser because they share data blocks. Add an exclude rule in Qdirstat for .snapshots or timeshift-btrfs so the treemap reflects your live data instead of counting snapshot contents.
Using the Package View on Arch
Qdirstat understands pacman, which unlocks one of its most useful features on Arch. Open the File menu and choose the option to show installed packages. Qdirstat asks pacman for the list of packages and the files they own, then builds a treemap where each top-level block is a package.
This view answers questions that are otherwise tedious to investigate: which installed applications are the largest, whether a heavy documentation or language pack is worth keeping, and how much space a desktop environment really uses. You can filter the package list by name pattern, which is handy for checking groups such as everything starting with texlive or qt6.
The unpackaged files view is equally valuable. It shows files in system directories that do not belong to any pacman package, revealing leftovers from make install, manually copied binaries or abandoned configuration. On a long-lived Arch installation, this view often uncovers surprising remnants.
Running Qdirstat with Root Privileges on Arch
Some directories under /var and /root are unreadable for normal users, and Qdirstat marks them as inaccessible. If you need a complete picture, you can start Qdirstat with elevated rights. On X11, sudo -E qdirstat / usually works. On Wayland, graphical applications running as root may fail to connect to the display, so you may need to allow it temporarily with xhost +si:localuser:root while using XWayland.
Whenever you run Qdirstat as root, treat cleanup actions with extra caution. A single misplaced delete inside /usr can break your system. Scanning as root and deleting as a normal user, or through pacman, is the safest combination.
Keeping Qdirstat Updated on Arch
Pacman does not update AUR packages by itself. If you use an AUR helper, a normal system update such as yay -Syu also checks the AUR and rebuilds Qdirstat when a new version appears. If you built manually, return to the cloned directory, run git pull and repeat makepkg -si.
After major Qt upgrades, AUR packages occasionally need a rebuild even when their own version has not changed. If Qdirstat refuses to start after a system update with a Qt library error, simply rebuild the package.
A Monthly Qdirstat Routine for Arch Users
Because Arch updates continuously, small amounts of disk growth accumulate faster than on a fixed-release distribution. A short, regular routine with Qdirstat prevents those small amounts from becoming a crisis. The following sequence takes about ten minutes once a month.
- Scan your home directory. Open Qdirstat on
~and look at the top five entries in the tree. Note anything that has grown noticeably since last month, especially inside.cache,.local/shareand download folders. - Check AUR build caches. Expand
~/.cache/yayor~/.cache/paru. If the total exceeds a gigabyte, clear old build folders. - Scan /var as root. Look at
/var/cache/pacman/pkg,/var/log/journaland/var/lib/dockeror/var/lib/containersif you use containers. - Run the proper cleaners. Use
paccache,journalctl --vacuum-sizeanddocker system pruneorpodman system prunerather than deleting those files directly. - Review orphaned packages. Run
pacman -Qdtqto list dependencies no longer required, then confirm with the Qdirstat package view whether removing them is worthwhile. - Rescan and compare. Press the refresh action in Qdirstat and confirm the space you expected has been recovered.
Following this routine, many Arch users find they rarely need emergency cleanups. Qdirstat becomes a quick health check rather than a rescue tool, and the familiar shape of your treemap makes anomalies obvious the moment they appear.
Useful Qdirstat Settings on Arch
Two settings are particularly helpful. First, keep “Cross Filesystems” disabled unless you deliberately want to include other mounts, so that a scan of / does not wander into external drives or network shares. Second, add exclude rules for directories you never want to analyse, such as Btrfs snapshot folders, so each Qdirstat scan is both faster and more accurate.
Frequently Asked Questions
Is Qdirstat in the official Arch repositories?
No. Qdirstat is provided through the AUR as qdirstat, qdirstat-git and qdirstat-bin, so you need an AUR helper or makepkg to install it.
Which Qdirstat AUR package should I choose on Arch?
Choose qdirstat for the stable release. Pick qdirstat-git only if you want the latest development code and accept occasional breakage.
Can I delete the pacman cache from Qdirstat?
You can, but it is better to use paccache, which keeps recent versions for downgrades and avoids removing files pacman may still need.
Does Qdirstat work on Manjaro and EndeavourOS?
Yes. Both are Arch-based and can install Qdirstat from the AUR in the same way, although Manjaro users should ensure their AUR access is enabled.
Conclusion
Qdirstat and Arch Linux make an excellent pair. Installing Qdirstat from the AUR takes only a few minutes, and its pacman-aware package view, clear treemap and configurable actions give you a precise picture of where your space has gone. Scan the pacman cache, AUR build folders and journal regularly, clean them with the proper Arch tools, and your rolling-release system will stay lean for years.



