On my laptop with macOS Sierra 10.12.5 (but it was happening with previous versions of the OS too), I get pinged by the system that I have only a few GBs left, I clean up, reboot, go from 4 GB left to 30 GB left, and within a couple of days, not doing anything special (not downloading movies or anything space-hungry), I get told again I have only 4 GB left … I went through that cycle a few times now, and I'm wondering what could be causing that behavior, and how I could stop it. Any idea or pointers to what I should look at on my HDD to try and understand this? (sleep images, sparse bundles…)
Note: this question is not about using a disk inventory app to find the large files that take up too much space on my HDD. What I am interested in is why I got from 30 GB after boot to 4 GB without installing anything on my Mac. I want to understand which process is doing that and stop it.
Best Answer
To get a convenient du-diff tool, install brew which requires Command Line Tools (CLT) for Xcode or Xcode, from within brew links (
brew install links
) and finally download and unzip gt5.gt5 is a shell script which can either be run directly from its current dir or you can move it to a directory in your PATH (
echo $PATH
). Make the script executable if necessary.Make a temp gt5 dir:
mkdir ~/.gt5-diffs
Run the script with:After running the script two times with a ∂t of eight minutes I get the following result:
After modifying the gt5 options (e.g. increase depth and/or lines)/dir and running the script several times you will get the culprit eating your disk space.
Due to the limitation of the --cut-at option to 0.01, folders with a size smaller than 0.01 percent of the total size of the superior folder aren't shown. In the above example that's / with 221 GiB: folders in the root folder with a total size smaller than 22.1 MiB won't appear (the sizes are base2 and not base10!). --cut-at defaults to 0.1 and can be adjusted between 0.01 and 30.