Use KDirStat to clean up disk space in Ubuntu

by Stephen Fluin 2010.01.16

My traditional process for cleaning up disk space is to recursively run "du -s * | sort -n" starting at /, and then descending into folders and looking for things I know I can delete. This process has worked well for me, and in the past I have tried out some of the visual tools to diagnose the issue, but in the end it always seemed like I broke down and went back to command line.

Today I tried a new tool, called KDirStat that I found in the Ubuntu package repository. After installing and trying it out, I found that it is a great tool for diagnosing disk usage problems, and for cleaning up your disk.

Steps To Use

After launching the application, and selecting a folder as a starting point (I chose my NFTS partition mounted at /media/disk/), the program greeted me with a useful list of the folders in that directory, and immediately began scanning them for folder size. Not only could I see the calculated subtree size, but I also reported the queue of disk reads that would be necessary in order for it to complete the scanning.

To clean up the filesystem, I sorted by subtree size and started descending my file tree. My general process is as follows:

  1. Duplicate Backups
  2. Duplicate Files
  3. Internet Media (.iso files, then media such as Audio/Video that could be retrieved from the internet later)
    1. If these steps aren't enough, it's probably time to purchase additional hard drives. I'm a huge fan of software RAID 5, which is easy on linux when using mdadm