Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Freeing GB on Your Mac: Cleaning Docker, Brew, and Dev Tools

As a developer, there’s that one afternoon, mid-sprint, when a build fails. Not because of bad code, but because your Mac has run out of disk space.

One quick check reveals 50GB sitting in hidden folders, most of it leftovers from Docker images, Homebrew caches, and abandoned dev tool installations that were never properly cleaned up.

If you’ve been there, you probably know how much time you have until your Mac starts having problems handling data and the performance becomes terrible, or it just crashes.

The good news is that it’s very easy to get that space back if you know where to look. Cleaning up a Mac used for development can free 20–40 GB (or more) of space by deleting unused Docker artifacts, old Homebrew packages, and cleaning caches for various tools.

Below, I’ll share with you how you can free up GB on your Mac with simple Terminal commands and more.

1.   Cleaning Docker: images, containers, and volumes

Docker is perhaps the worst offender. Every image pulled, every stopped container, and every unused volume remains on disk until manually deleted.

The most efficient way to clean up unused Docker resources is by using the docker system prune command, which removes stopped containers, unused networks, and dangling images.

To get started, Open Terminal with these simple steps:

Important: You must have installed Docker first on your Mac, and it should be running (via Docker Desktop). Otherwise these commands won’t work.

The nuclear option for unused data is the Terminal command: docker system prune -a –volumes

This will remove all stopped containers, all networks not used by at least one container, and all images not referenced by any container in the system.

For a more surgical approach, you can break it down like this:

  • Remove stopped containers: docker container prune
  • Remove unused images:docker image prune -a
  • Remove unused volumes:docker volume prune

Running the docker system df command before and after shows you what you’ve reclaimed. It’s a simple exercise that helps you save 15GB or more.

One habit worth building: run docker system prune at the end of each project sprint. It takes seconds and keeps things from compounding.

2.   Cleaning up Homebrew

Homebrew is the package manager almost every Mac developer uses, and it quietly hoards old versions of formulae, cached downloads, and outdated dependencies.

The one main Command to rule them all is: brew cleanup

This will remove all old versions of software installed via Homebrew, along with their associated downloads. By default, it will keep versions that are less than 120 days old.

If you really want to delete everything, consider the command:

brew cleanup –prune=all

To see what will be removed before actually doing it:

brew cleanup -n

Run the command brew autoremove to remove all installed formulae that were pulled in as dependencies and are no longer needed by any active components. Together, these commands can recover several GB, depending on how long Homebrew has been running untouched.

For a full audit of what is installed and potentially removable, the brew list gives a complete picture. Anything unfamiliar is worth investigating.

Note: Just as Docker, these commands only work if Homebrew is installed.

3.   Uninstalling Dev Apps that overstay their welcome

This is where many developers lose unnecessary gigabytes without realizing it. Old versions of Xcode, Android Studio, virtual machine software, and other heavyweight tools tend to sit around long after they stop being useful.

Dragging an app to the Trash does not, by itself, remove everything related to that app. App support files, caches, preferences, and login items are left behind, scattered throughout the Library folder. Over time, these files can take up a significant amount of disk space.

A dedicated application remover for Mac handles all of this. It will find any files associated with the DEV apps on your system and delete them in one fell swoop, without leaving behind bits and pieces often left behind by manual drag-and-drop deletion.

This is especially important for large development environments like Xcode, which can easily get you 12GB+ in reclaimed space.

4.   System and app caches

MacOS stores caches in ~/Library/Caches. Most of these are safe to delete, with the system regenerating what it needs. Navigate there and sort by size to catch the heaviest offenders.

Be cautious with anything unfamiliar, but folders named after apps that are no longer installed are safe to remove entirely.

Also worth checking:

 ~/Library/Developer/Xcode/DerivedData fills up fast during active development. If you delete it, Xcode will rebuild during the next project compile. Still, it’s entirely safe to run the command and recover several gigabytes of space on your Mac.

Conclusion

Storage cleanup on a dev machine isn’t a one-time thing. Most of the efficiency comes from small habits—run docker system prune at project milestones, let brew cleanup run here and there, do a proper app audit every once in a while.

For a more thorough clean, you’ll want to spend more time trawling through leftover files and some cruft that has built up over the years. After all, a clean machine is a happy machine, and we all know happy machines are productive.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

6 Best Klaviyo alternatives for feature availability 2026

Email marketing is a channel that you completely own and that holds an average of $36-$42 ROI for every dollar spent. Once brand owners recognize this number,…

Read More

Technologies in iGaming and the Role of Soft2Bet

Modern iGaming technology connects online casinos, sportsbooks, payments, user accounts, data tools, and product design, while Soft2Bet offers a practical example of how these layers can work…

Read More

Top 10 AI Technical Writing Assistants: Features, Pros, Cons & Comparison

Introduction AI Technical Writing Assistants help engineering teams, DevOps teams, product teams, API developers, and documentation specialists create clear, structured, and consistent technical content such as API…

Read More

Top 10 AI Product Spec Writing Assistants: Features, Pros, Cons & Comparison

Introduction AI Product Spec Writing Assistants help product managers, founders, designers, engineering leads, and business teams turn ideas into structured product requirement documents, user stories, acceptance criteria,…

Read More

Top 10 AI Observability Copilots: Features, Pros, Cons & Comparison

Introduction AI Observability Copilots help engineering, DevOps, SRE, platform, and AI infrastructure teams monitor, investigate, analyze, and optimize complex systems using conversational AI, automated telemetry correlation, anomaly…

Read More

Best Higher Education SEO & GEO Agencies for Enrollment Growth

Enrollment growth through digital channels has always depended on one foundational requirement — that prospective students can actually find the institution at the moments when they are…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x