Today, my laptop disk became full. So, I wanted to get the most bang for my buck and not waste my time erasing small files that weren't taking up a bunch of disk space. How does one do that? One way is the command line utility du, but I knew there were a few programs out there that visualized the amount of space used. (Plus I knew that du would send me digital reams of information, so I figured visualization would be easier to digest).

Searching led to this article and from that I installed KDirStat and filelight. (Thankfully they were both an emerge away thanks to Gentoo.)

How do the two apps compare? I think treemaps are very useful for many visualizations. But in this instance, the radial interface of filelight come across much simpler than KDirStat. KDirStat doesn't provide any textual information in the treemap, but instead relies on a treetable control in another pane that shows all of one's files. If you click on a file, it highlights it in the treemap, and vice versa. Filelight, on the other hand updates the labels based on the band you are mousing over. When you hover over a ring, it indicates how much disk space that ring is taking and it's size (ie: /home 12,499MB 40%). Also, when one mouses over a ring, all the child directories are given labels. This interfaces provides a quick way of seeing what directories are taking up all the space. It is quite intuitive and I quickly discovered a few things:

  • My 20 copies of the kernel (linux-2.6.15-gentoo-r1/ through linux-2.6.20-gentoo-r8/ were taking some 8.5 gigs in /usr/src. DOH!
  • ~/.googleearth has some 230MB of cache files!
  • Hugin (panoramic stitcher) works in TIFF (~400MB of data files from attempts to make 3 panoramic photos) Using the information these tools provided me (and copying some mp3s to an external drive, quickly gave me back some 14 Gigs).

To be fair, KDirStat also shows this information, though it only shows parent folder sizes in the treetable, while the treemap itself shows individual files (clicking on a directory draws a red square around the files it contains). It also appears that the backend for KDirStat is a little smarter than filelight. Filelight rescanned directories upon double clicks (which can take a while on slow laptop drives), which KDirStat appears to cache and allows you to quickly zoom in and out.

Would I use these programs everyday? Probably not, though they were quite useful in cleaning up the junk that was taking the most space. Had I not used them I probably would've forgotten about all those old kernels, and I would've never known about the google cache.

Below are screenies of both programs. KDirStat only scanned my home directory while, Filelight scanned the whole "/" drive (the blue rings are my home directory).