Qdirstat / Guides / Debian & Ubuntu

Qdirstat Debian and Ubuntu Guide: Install, Update and Use

By the Qdirstat Guides TeamUpdated 3 December 20267 min read
Rows of removable data cartridges in an equipment drawer

On Debian and Ubuntu, Qdirstat uses the package database to show which installed packages own files. Install the version supplied by your distribution, launch it as your regular user, and start by scanning a folder you know. This gives you a baseline before inspecting system directories.

The sections below cover installation, package ownership and common locations for logs or package caches. They also explain when building a newer release is useful and how to remove the application using apt when needed.

Qdirstat in the Debian Archive

Qdirstat has been part of Debian for many years and is available in the main repository, so no extra sources are needed. Ubuntu inherits the package from Debian and offers it in the Universe component, which is enabled by default on standard desktop installations.

Debian’s stable releases freeze package versions at release time, so the Qdirstat you receive depends on your Debian or Ubuntu version. Newer releases typically carry Qdirstat 1.9, while development branches move to Qdirstat 2.0 and its Qt 6 base. For everyday disk analysis these versions behave almost identically; the tree, the treemap, the package view and cleanup actions are present in all of them.

You can check exactly which version your system offers before installing:

apt policy qdirstat

Installing Qdirstat on Debian and Ubuntu

Using apt in the Terminal

Open a terminal and run:

sudo apt update
sudo apt install qdirstat

Apt resolves the dependencies, which are mainly the Qt libraries, zlib and a few Perl modules used by the helper scripts, and installs everything in a few seconds. Qdirstat then appears in your application menu under System or Utilities, depending on your desktop.

Using a Graphical Software Centre

If you prefer not to use the terminal, search for Qdirstat in GNOME Software, the Ubuntu App Center, the Linux Mint Software Manager or Synaptic. Make sure you select the entry provided by the distribution’s own repository rather than a third-party format, so updates follow your normal system upgrades.

Launching Qdirstat

Start Qdirstat from the menu or type qdirstat in a terminal. You can pass a directory to scan immediately, for example qdirstat /home. When Qdirstat opens without an argument, it asks which directory you want to analyse.

Using the dpkg Package View

Qdirstat understands dpkg, the package system at the heart of Debian and Ubuntu. Choose the option to show installed packages from the File menu and Qdirstat builds a treemap in which each block is an installed package, sized by the files it owns.

This perspective is especially useful on Debian systems that have been upgraded through several releases. You may discover old kernel packages, large language packs, documentation bundles or development libraries that were pulled in once and never removed. Filtering by name lets you inspect groups such as linux-image, libreoffice or texlive quickly.

When you find a package you no longer need, remove it with apt rather than deleting its files in Qdirstat:

sudo apt remove package-name
sudo apt autoremove

The unpackaged files view complements this by showing files under system directories that dpkg does not track. Leftovers from make install, manually copied binaries in /usr/local or abandoned configuration can be found in seconds.

Places Worth Scanning on Debian-Family Systems

The APT Cache

Downloaded package files are kept in /var/cache/apt/archives. On most desktops apt cleans this automatically, but servers and customised systems may accumulate hundreds of megabytes. Clear it safely with:

sudo apt clean

Old Kernels

Each kernel installs modules under /lib/modules and images under /boot. Qdirstat shows these clearly in the package view. Use sudo apt autoremove to remove kernels that are no longer needed, keeping at least the running kernel and one fallback.

Systemd Journal and Logs

Debian and Ubuntu store persistent journals in /var/log/journal and traditional logs in /var/log. If Qdirstat reveals large log files, investigate why a service is logging so much before trimming the journal with sudo journalctl --vacuum-time=4weeks.

Snap Packages on Ubuntu

Ubuntu installs some applications as snaps, which live in /var/lib/snapd and keep several revisions. Qdirstat often reveals that old snap revisions take several gigabytes. Reduce the number of retained revisions with sudo snap set system refresh.retain=2 and remove disabled revisions through snap’s own commands rather than deleting files manually.

Flatpak Runtimes

If you use Flatpak, runtimes accumulate in /var/lib/flatpak and ~/.local/share/flatpak. After scanning with Qdirstat, remove unused runtimes with flatpak uninstall --unused.

Getting a Newer Qdirstat on Debian or Ubuntu

Most users are well served by the repository version. If you want the newest Qdirstat release on a stable Debian or an older Ubuntu LTS, you have a few options.

Build Qdirstat from Source

Download the Qdirstat master-branch source ZIP, then install the build requirements and compile. For Qdirstat 2.0 and later you need Qt 6 development packages:

sudo apt install build-essential qt6-base-dev qt6-5compat-dev zlib1g-dev
unzip qdirstat-master.zip
cd qdirstat-master
qmake6
make -j"$(nproc)"
sudo make install

Package names for Qt 6 can differ slightly between releases, so search with apt search qt6 if any are missing. Remember that files installed with make install are not tracked by dpkg; keep the source folder so you can run sudo make uninstall later.

Use Backports Where Available

Debian backports sometimes provide newer versions of desktop utilities for the current stable release. If a Qdirstat backport exists for your release, enabling backports and installing with sudo apt install -t bookworm-backports qdirstat (adjusting the release name) gives you a newer version while staying within the package system.

Use Docker

Running Qdirstat in a container is another way to use a newer build without touching your system libraries. Our Qdirstat Docker guide explains the setup.

Running Qdirstat with Elevated Rights on Debian

Some system folders cannot be read by normal users, and Qdirstat marks them as inaccessible. To scan them, launch Qdirstat with root privileges. On Ubuntu desktops, sudo -E qdirstat / usually works under X11. Under Wayland you may need pkexec or temporary XWayland access. Treat every cleanup action with extra care while running as root, and prefer removing software through apt instead.

Reading Qdirstat Results on a Typical Ubuntu Desktop

When you first scan your home folder on an Ubuntu or Mint desktop, the Qdirstat tree usually follows a familiar pattern. Knowing that pattern helps you separate normal usage from genuine waste.

  • .cache is often the largest hidden folder. Browser caches, thumbnail caches and pip or npm caches all live here. Most of it can be cleared safely while the related applications are closed.
  • .local/share contains application data such as Flatpak user installations, Steam libraries, GNOME Boxes virtual machines and the desktop trash in .local/share/Trash. Emptying the trash alone sometimes frees gigabytes.
  • snap in your home folder holds per-user data for snap applications, including browser profiles on recent Ubuntu releases.
  • Downloads tends to collect installers, ISO images and archives that were needed once. The Qdirstat Discover menu’s oldest files list is perfect for reviewing it.
  • Videos and Pictures appear as large single-colour blocks in the treemap. These are usually valuable, so consider moving them to external storage rather than deleting them.

At system level, a scan of / typically shows /usr and /var as the heaviest branches. A large /usr is normal and best managed through the package view, while an unusually large /var deserves investigation, because logs, caches, snaps and container data all live there.

Comparing scans over time is a powerful habit. Note the size of the top-level folders each month; a branch that grows steadily without explanation is the one to examine first.

Removing Qdirstat

If you ever want to uninstall Qdirstat, use apt:

sudo apt remove qdirstat

Your personal settings stay in ~/.config/Qdirstat. Delete that folder as well if you want to remove every trace of your configuration.

Frequently Asked Questions

Is Qdirstat available in the official Debian repositories?

Yes. Qdirstat is in Debian’s main archive and in Ubuntu’s Universe component, so sudo apt install qdirstat works on standard installations.

Why is my Debian Qdirstat version older than the latest release?

Debian stable freezes package versions at release time for reliability. Newer Qdirstat versions arrive in later releases, backports or by building from source.

Does Qdirstat work on Linux Mint and Pop!_OS?

Yes. Both are based on Ubuntu, so Qdirstat installs with apt or through their software managers exactly as on Ubuntu.

Can Qdirstat show which Debian packages use the most space?

Yes. The package view reads dpkg data and displays every installed package as a block in the treemap, sized by the files it owns.

Conclusion

On Debian, Ubuntu and their many derivatives, Qdirstat is only one apt command away. Its dpkg-aware package view, clear treemap and safe workflow help you find forgotten kernels, oversized caches, old snap revisions and stray manual installations. Use apt and the proper cleaners to remove what Qdirstat reveals, build from source only when you truly need the newest release, and your Debian-family system will stay tidy and responsive.