QDirStat in General

See QDirStat project page at GitHub

QDirStat Packages View

This view is new since a couple of weeks:

Pkg View

This is a view showing the disk usage by package so you can see what packages consume the most disk space.

This works for

  • RPM (SUSE, Red Hat)
  • Dpkg (Debian, Ubuntu, *buntu)
  • PacMan (Arch Linux, Manjaro)

...and all higher-level package managers that are based on any of these (zypper, apt, dnf, ...).

More details at the pkg view documentation.


QDirStat Unpackaged Files View

This solves the inverse problem: Show all files that are not packaged. Of course this only makes sense for system partitions and directories.

Use Cases

  • Recovering a wrecked system after botched upgrades
  • Recovering from too much sudo make install
  • Fixing packaging problems, e.g. find leftover shared libs that tend to get in the way
  • QA for release managers, QA engineers, PMs
  • Satisfying user curiosity

Script Solution

First approach based on some creative scripting and misusing QDirStat's qdirstat-cache-writer Perl script as a base:

https://github.com/shundhammer/qdirstat/tree/master/scripts/pkg-tools

This creates a QDirStat cache file of the root filesystem, a full file list of all installed packages, diffs the two, throws out directories that are now completely empty, and displays the remainder (which is again in QDirStat cache file format) with the QDirStat GUI.

This works, but it's crude, and it's not well integrated into the GUI.

Pros

  • Available
  • Works
  • Batch solution with a (gzipped) text file output that can be used in other tools (QA!)

Cons

  • Crude
  • Not integrated into the GUI
  • Misleading and dangerous while exploring the leftover directory tree because a user might think that the displayed files are the only ones in a directory, so he might be tempted to do dangerous operations on the directory level (rm -rf), but the other files (the packaged files) are still there, of course, and will be killed along with unwanted unpackaged leftover files.
  • Users are not even aware that this exists, so they will never get a chance to try it.

Hackweek Project: Do it Right with Full GUI Integration

  • New menu entry File -> Show Unpackaged Files
  • Open a dialog to let the user select a starting directory (/, /usr etc.; known system directories)
  • Predefined exclude directories that are known and expected to have unpackaged files (/tmp, /var, /home, /root)
  • Use the existing PkgManager classes (for RPM, Dpkg, PacMan) to create a full file list of all installed files
  • Read the directory
  • Mark the files that are in the full file list cache as ignored

Internally:

  • [Done] Add another ExcludeRules class to the DirTree class for the temporary excludes (/tmp/, /var, /home, /root, ...)
  • [Done] Add a dialog to let the user select the starting directory and the temporary excludes and start the whole process of reading and filtering
  • [Done] Use the normal directory reader class
  • [Done] Filter out the tmp excludes as well
  • [Done] Add a generic filter mechanism to ignore files
  • [Done] Add a specific filter class to ignore files in the file list cache
  • [Done] Introduce an attic pseudo directory for ignored files and directories (very much like the <Files> "dot entry")
  • [Done] Consolidate attics on different tree levels if a complete subtree is ignored
  • [Extension] Add more filters to also ignore common unpackaged, but less important stuff like *.pyc (compiled Python)

Repo + Branch

https://github.com/shundhammer/qdirstat (Git Master)

Old branch - now merged to master (and thus obsolete): https://github.com/shundhammer/qdirstat/tree/huha-unpkg-view

Contributing

Docs at the QDirStat repo:

Result

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 18

Activity

  • almost 5 years ago: shundhammer started this project.
  • almost 5 years ago: shundhammer originated this project.

  • Comments

    Similar Projects

    This project is one of its kind!