How I cleaned up space on my mac as a developer

Freeing up space on my machine with the mac-cleanup command-line tool

A “Your mac is running low on disk space” warning that has been driving me crazy the last couple of weeks. Image by Author.

I’ve been plagued by “Your Mac is running low on disk space” warnings for the past couple of weeks. After not being able to update my computer because I had too many files, I have decided that enough is enough. Today, it is time I get my act together and take back control of my life. No longer will I be a file hoarder!

After searching for a tool online, I stumbled across a project called mac-cleanup at After reading the readme, it appears to clear common office files that build up: Adobe, Google chrome and Dropbox. However, what I liked most was its ability to clean up Docker, npm, yarn and other developer related files.

This fixes one of my main storage problems. As a developer, I start multiple projects (many that I never finish), and over time my computer get’s clogged up with many files that I no longer need or use.

Follow along and you too shall learn how to cleanup your mac’s free space with this handy command-line tool. If you’re not a developer, don’t worry, I’ll explain everything.


The readme of the project shows that mac-cleanup can be installed in a number of ways: using homebrew, curl or wget. First, open your terminal (If you don’t know what that is, click the search button on the top right of your mac, and type “”).

If you don’t have homebrew, install by typing (following instructions at

/bin/bash -c “$(curl -fsSL”

Once you have homebrew, installation on the terminal is as simple as typing:

brew tap fwartner/tap

followed by:

brew install fwartner/tap/mac-cleanup

What this does is first add fwartner’s tap to homebrew (tap is homebrew’s fun name for adding a source to install apps from). Then, it installs the mac-cleanup utility.


After consulting the extremely helpful help page (a subtle joke, as this app is so minimal, it contains basically nothing..) with:

mac-cleanup -h

I can see that all you really need to do is type mac-cleanup and press enter like so!

Using mac-cleanup. GIF by Author.

After running I cleaned up 20GB of space! Just enough for my update.

Similar apps

Digging a bit further, I’ve also found there is a fresh-in-development mac-cleanup being built in python. This appears to have new configuration options and progress bars, which seem nice. Give that project a view if you feel like it, here.

Let me know how much storage you saved in the comments! Also, if you found any other storage saving developer tricks, please share them. Thanks for reading! 🥳 💻

How to clean up space on your mac as a developer was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.

​ Level Up Coding – Medium

about Infinite Loop Digital

We support businesses by identifying requirements and helping clients integrate AI seamlessly into their operations.

Gartner Digital Workplace Summit Generative Al

GenAI sessions:

  • 4 Use Cases for Generative AI and ChatGPT in the Digital Workplace
  • How the Power of Generative AI Will Transform Knowledge Management
  • The Perils and Promises of Microsoft 365 Copilot
  • How to Be the Generative AI Champion Your CIO and Organization Need
  • How to Shift Organizational Culture Today to Embrace Generative AI Tomorrow
  • Mitigate the Risks of Generative AI by Enhancing Your Information Governance
  • Cultivate Essential Skills for Collaborating With Artificial Intelligence
  • Ask the Expert: Microsoft 365 Copilot
  • Generative AI Across Digital Workplace Markets
10 – 11 June 2024

London, U.K.