My disk space was running low. I had less than 100MB of free space. I was sick of running low on disk space.

Clean My Mac wasn't an option. I don't want to spend 40$ for a cleaning tool, if you're so inclined feel free to do it.


A search on GitHub revealed the following scripts (not very much up to date, but they get their job done):

rm -rf all the things

I selectively ran the steps in clean_my_mac.sh.

The available disk space went up a few GB.

https://media.giphy.com/media/Vd317WWBZKB6zP1WV1/giphy.gif

Ran a few steps from maid.sh which helped to free up some more GB:

...
#Taking out the trash.
printf "Emptying the trash.\n"
sudo rm -rfv /Volumes/*/.Trashes > /dev/null 2>&1
sudo rm -rfv ~/.Trash  > /dev/null 2>&1

#Clean the logs.
printf "Emptying the system log files.\n"
sudo rm -rfv /private/var/log/*  > /dev/null 2>&1
sudo rm -rfv /Library/Logs/DiagnosticReports/* > /dev/null 2>&1

printf "Deleting the quicklook files.\n"
sudo rm -rf /private/var/folders/ > /dev/null 2>&1
...

mac-cleanup

Then I installed mac-cleanup with sh -c "$(curl -fsSL https://raw.githubusercontent.com/fwartner/mac-cleanup/master/installer.sh)" and ran cleanup -n.

It's gonna take a while.

-n skips brew. brew is going to be inspected separately.

inspecting brew

Running brew cask list list revealed a whole lot of heavy casks installed in the past. nuke them.

Simply get the name of the cask and run brew cask uninstall [CASK_NAME].

Did the same for brew list, then running brew uninstall [NAME].

mac-cleanup again

Ran cleanup (this time without the -n flag), and this is the result:

mac cleaned