PURGE that excess disc space in OSX

Quick PSA. A lot of us who use iCloud Drive as storage run into this issue where our HD's are full up where OSX reports a whole lot of purgeable space.

So I've searched the far reaches of cyberspace for a solution on how to force OSX to purge this space so I can actually install something on the drive. After a lot of shitty pages trying to sell me even shittier Apps that just delete cache or empty trash I seem to have found the solution. It's surprisingly easy!

Just open a terminal window and whack:

dd if=/dev/urandom of=sparseFile bs=1m count=5000000

This will slowly start creating a file called sparseFile in the root of your home folder of randomised junk. Since it's being slowly created it gives OSX time to purge disk space to make room for all this trash.

Once it's done. Just delete the file and you've got 50GB of actual free space to play with.

Now is the time to install that AppStore download that you couldn't. Since OSX will immediately try and fill that 50GB back in with iCloud junk.