A while back, I bought my first Macbook. I've had iMacs in the past, but never a MacBook. As part of that, I figured I'd up the RAM to 16GB, and keep the hard drive as 256GB. I can't upgrade the RAM later, but I can always buy an external hard drive (which I sort of did when I bought the D50 SSD Dock).
However... 256GB is not enough. I've filled that up way too quickly, so now I've been on the warpath of cleaning up that hard drive so I don't get low storage notifications. Because of this, I've been running CleanMyMac X which helped a lot, but I still knew I could free up more space, and I figured why not just remove all of the iCloud backed up files from my storage. If I need it, I can always download it again, no big deal. So I needed to figure out how I go about this.
A bit of Googling brought me to this wonderful post by Rakhesh. So thank you for this post! I figured I'd share the steps as well for anyone who is looking to do the same.
First, open up your Terminal (whether that's the one built in to Mac, iTerm, or Warp, which is what I use and absolutely love). Then, you'll need to change the directory to the folder you want to remover the iCloud downloaded files. For me, that was my documents folder. You do that with the following command:
Once you are in your desired folder, you'll run the following command to actually remove the files locally:
Now, let's break this command down.
- find - Self explanatory, finds what you ask it to
- . - The dot means in the current directory
- -type f - This means to only look at items with the type of file (not folders)
- -exec - Run a command
- brctl - Can be used to download or un-download files.
- evict - Un-downloads the file (evict is a sub-command of brctl)
- { } \; - Run the command on each file it finds
I hope this is just as helpful for you as it was for me!