Home

Awesome

QDirStat

<img src="https://github.com/shundhammer/qdirstat/blob/master/src/icons/qdirstat.svg" height="64">

Qt-based directory statistics: KDirStat without any KDE -- from the author of the original KDirStat.

(c) 2015-2024 Stefan Hundhammer Stefan.Hundhammer@gmx.de

Target Platforms: Linux, BSD, Unix-like systems; macOS

License: GPL V2

Updated: 2024-09-28

Screenshot

<img width="900" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-main-win.png">

Main window screenshot: Tree view (upper half), treemap (below), details panel (right).

Notice the multi-selection in the tree and the treemap.

Overview

QDirStat is a graphical application to show where your disk space has gone and to help you to clean it up.

It shows the total size of directories and of their files both in a traditional tree view and in a colored treemap graphics where a large file is shown as a large rectangle, and small files are shown as small rectangles. Click on it, and you will see where in the tree the file is, and you can instantly move it to the trash if you like. The color corresponds to the file type: Images, videos or whatever.

This is a Qt-only port of the old Qt3/KDE3-based KDirStat, now based on the latest Qt 5. It does not need any KDE libs or infrastructure. It runs on every X11-based desktop on Linux, BSD and other Unix-like systems, and in a Docker container.

QDirStat has a number of new features compared to KDirStat. To name a few:

See section New Features for more details.

Table of Contents

  1. Screenshot
  2. Latest Stable Release
  3. Latest News
  4. History
  5. Related Software: KDirStat, WinDirStat, K4DirStat and more
  6. Motivation / Rant: Why?
  7. Features
  8. macOS Compatibility
  9. Windows Compatibility
  10. Ready-made Packages
  11. QDirStat Docker Containers
  12. Building
  13. Contributing
  14. Troubleshooting
  15. Further Reading
  16. Packaging Status
  17. Donate

More Screenshots

<img align="top" height="237" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-file-type-stats.png"> <img align="top" height="169" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-cleanup-output.png" > <img align="top" height="150" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-column-config.png" >

<img width="700" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-locating-file-types.png">

<img align="top" width="180" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-config-cleanups.png"> <img align="top" width="180" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-config-mime.png" > <img align="top" width="180" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-config-exclude.png" > <img align="top" width="180" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-config-general.png" >

<img align="top" height="220" src="https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-histogram.png"> <img align="top" height="220" src="https://github.com/shundhammer/qdirstat/blob/master/screenshots/QDirStat-file-age-months.png" >

Full-size images and descriptions on the Screenshots Page


Donate

QDirStat is Free Open Source Software.

If you find it useful, please consider donating. You can donate any amount of your choice via PayPal:

paypal

Latest Stable Release

QDirStat V1.9

See the release announcement.

Download installable binary packages for various Linux distributions here: Ready-made packages

Latest News



See DevHistory.md for older entries.

History

This is just a rough summary. For more details, see DevHistory.md.

Related Software

KDirStat and QDirStat

KDirStat was the first program of this kind (combining a traditional tree view with a treemap), also written by the same author as QDirStat. It was made for KDE 1 back in early 2000; later ported to KDE 2, then KDE 3.

QDirStat is based on that code, but made independent of any KDE libraries or infrastructure, so it has much fewer library and package dependencies; basically only the Qt 5 libs and libz, both of which most Linux / BSD machines have installed anyway if there is any graphical desktop installed.

WinDirStat and QDirStat

There are lots of articles and user forum comments about QDirStat being a "nice Linux port of WinDirStat". Well, nothing could be further from the truth: WinDirStat is a Windows port of KDirStat, the predecessor of QDirStat.

So it's the other way round: The Linux version was there first, and somebody liked it so much that he wrote a Windows version based on that idea. That's a rare thing; usually people port Windows originals to Linux.

See also https://windirstat.net/background.html and the WinDirStat "About" dialog.

QDirStat and K4DirStat

K4DirStat is a port to KDE 4 / Qt 4 of the old KDE 3 / Qt 3 KDirStat. QDirStat is independent of that; it is based on the old KDE 3 KDirStat directly.

Other

See Disk Usage Tools Compared: QDirStat vs. K4DirStat vs. Baobab vs. Filelight vs. ncdu (including benchmarks) in the Wiki.

Motivation / Rant: Why?

After having used KDE since its early days (since about 1998), I didn't like the direction anymore that KDE has been taking. I loved KDE 1, KDE 2, KDE 3. When KDE 4 came along, it took me a long time to try to adopt it, and when I did, I moved back to KDE 3 after a short while, then tried again with the next release, moved back again -- several times.

I really tried to like it, but whenever I thought I tamed it to meet my requirements, a new version came along that introduced yet another annoyance.

To name a few:

Then the next generation KDE arrived, Plasma 5. When I was force-migrated to it at work with the SUSE Tumbleweed rolling release, the experience was so bad that I moved to the Xfce Desktop.

Now every time I started my own KDirStat, it started about a dozen KDE processes along with it -- processes that it needs only for minor things like loading icons or translations. I really don't need or want that.

So it was time to make KDirStat self-sufficient; it never used that much of all the KDE infrastructure anyway. Time to make a pure Qt-based and self-sufficient QDirStat.

And while I was at it, I took the chance to add some features that I had wanted for a long time, yet I had never gotten myself to start working on:

Yes, there is a Qt4 / Qt5 port of KDirStat called K4DirStat. K4DirStat is an independent project that started when I had not worked on the old KDirStat for a long time (my last KDirStat release had been in mid-2006).

QDirStat is based on that same code from the 2006 KDirStat. It's an 80% rewrite using a lot of newer Qt technologies. And there was a lot of cleaning up that old code base that had been long overdue.

Features

New Features

Old Features

Features ported from the old KDirStat:

Features that are Gone

(Compared to the old KDirStat)

<details> </details>

macOS Compatibility

Ready-made Binaries for macOS

New 2024-02-13:

Platform binaries built by Jesus Herrera Arroyo chuy.max@gmail.com

at https://github.com/jesusha123/qdirstat-macos

(go to Releases at the right side panel)

and via Homebrew.

Building on macOS

See Jesus Herrera's build instructions.

Notice that those instructions are also based on using the original QDirStat sources from here, so you are not putting anything at risk.

Windows Compatibility

There is no native Windows version, but you can use the docker container. Other than that, there is WinDirStat.

<details> There are currently no plans for doing a native Windows port.

Directory reading might be quite easy to replace for Windows; we don't have that problem with devices and crossing filesystems on that platform.

But the cleanups might be a challenge, "move to trash" works completely differently, and we'd need an installer for a Windows version.

So, for the time being, use the docker or WinDirStat instead.

WinDirStat is a close relative to the KDirStat family anyway; the author had liked KDirStat on Linux so much that he decided to write a Windows clone and called it WinDirStat.

</details>

Ready-made Packages

Packaging status

openSUSE / SUSE Linux Enterprise

QDirStat packages for openSUSE Tumbleweed / Leap 15.x and SLE (15, 12) (Notice that Leap 15.3 is wrongly sorted into the SLE category, not openSUSE as it should):

Ubuntu

https://packages.ubuntu.com/search?keywords=qdirstat&searchon=names

Debian

https://packages.debian.org/search?keywords=qdirstat

Fedora

https://packages.fedoraproject.org/pkgs/qdirstat/qdirstat/

QDirStat Docker Containers

There are currently two publicly available docker containers for QDirStat:

(see their respective release pages for more detailed information about the QDirStat version they provide)

Those containers make QDirStat usable even on non-Linux / non-Unix systems such as Windows or macOS.

Docker is basically a virtualized environment to run software that was designed for a different operating system.

It is very much like using VmWare or VirtualBox, but with much less overhead: You don't have to install that other system first and then on top of that the application that you really want to run. A docker container contains everything that is needed, and it is preconfigured for that application.

How to use Docker on Windows

More information:

Building

Notice that for most mainstream Linux or BSD distributions you don't have to build your own; you can simply install a ready-made package from your normal package manager.

Build Environment

Make sure you have a working Qt 5 build environment installed. This includes:

If anything doesn't work, first of all make sure you can build any of the simple examples supplied with Qt, e.g. the calculator example.

Ubuntu

Install the required packages for building:

sudo apt-get install build-essential qtbase5-dev zlib1g-dev

Dependent packages will be added automatically.

Recommended packages for developers:

sudo apt-get install qttools5-dev-tools qtbase5-doc qtbase5-doc-html qtbase5-examples

See also

https://askubuntu.com/questions/508503/whats-the-development-package-for-qt5-in-14-04

If you also have a Qt4 development environment installed, select the desired one via qtchooser:

sudo apt-get install qtchooser
export QT_SELECT="qt5"

SUSE

Install the required packages for building:

sudo zypper install -t pattern devel_C_C++
sudo zypper install libQt5Widgets-devel libqt5-qttools zlib-devel

If you also have a Qt4 development environment installed, make sure that the Qt5 version of 'qmake' is the first in your $PATH:

export PATH=/usr/lib64/qt5/bin:$PATH

Compiling

Open a shell window, go to the QDirStat source directory, then enter these commands:

qmake
make

Installing

sudo make install

or

su -c make install

Install to a Custom Directory

The default setup installs everything to /usr. To install to another directory, set INSTALL_PREFIX during qmake.

<details>
qmake INSTALL_PREFIX=/usr/local

Beware that some things might not work as expected; for example, you will not get a .desktop file in the proper place to make QDirStat appear in any menus in your graphical desktop environment or in the file manager. You will need to copy the .desktop file manually to whatever directory your graphical desktop environment uses somewhere in your home directory. Similar with the application icon used in that .desktop file.

</details>

Contributing

See file Contributing.md and GitHub-Workflow.md

Troubleshooting

Can't Move a Directory to Trash

See file Troubleshooting.md

Further Reading

Of course, don't forget to check out the doc directory.

Packaging Status

Repology: QDirStat versions in Linux / BSD distributions:

Repology

(click for details)

Donate

QDirStat is Free Open Source Software.

If you find it useful, please consider donating. You can donate any amount of your choice via PayPal:

paypal