I was running out of storage on my 128 GB MacBook, so I decided to research ways to free up space. I use Homebrew, Git, JS, and Xcode pretty often, so this tutorial caught my eye: freeCodeCamp - How to free up space on your developer Mac. The tutorial was pretty helpful, but copy and pasting each and every command into Terminal every few weeks became tedious. So, I created this ZSH script to do it for me.
- Clone this repository to your computer.
- Double-click the
cleanup.command
file and let it run in Terminal (make sure you're using ZSH, not Bash). If you encounter an error about Terminal not having permission to open the file, run this command:chmod u+x [FILE PATH]
.
If you want to use Bash instead of ZSH, open the file in textEdit (or a similar text editor) and replace the very first line with #!/bin/bash
.