QDirStat in General
QDirStat Packages View
This view is new since a couple of weeks:
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.
- 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
First approach based on some creative scripting and misusing QDirStat's
qdirstat-cache-writer Perl script as a base:
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.
- Batch solution with a (gzipped) text file output that can be used in other tools (QA!)
- 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 (
/usretc.; known system directories)
- Predefined exclude directories that are known and expected to have unpackaged files (
- 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
- [Done] Add another ExcludeRules class to the DirTree class for the temporary excludes (
- [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
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
Docs at the QDirStat repo:
This project is one of its kind!