Clean Free Space Mac

  

Ways to free up disk space on a Mac. Before we show you how to clear disk space on your Mac, a word of caution is in order. Hard drive cleaning requires time and, in some cases, expertise. So, when in doubt, use a professional cleaning app. Now, let’s make some room for the files that truly deserve space on your Mac. Free up space on your Mac with BuhoCleaner. By Ian Fuchs. 6:00 am, September 18, 2021. The Flash Clean feature lets you clean up your Mac in a flash! Screenshot: BuhoCleaner.

Clean up your dev environment you filthy animal!

Ilove cleaning software? PLZ! Remove duplicates, find old OS cruft etc. But it never cleans a development machine as I can.

Sure, for general maintenance, nothing beats CleanMyMac. But once a year, developers should run through a few manual commands, because auto-cleaners won’t know how to take care of a developer machine.

Before we start, let’s look at how much “Free Space” you’re starting with:

Mine is reporting 132.2 GB before cleaning. Time to get started!

Mac Homebrew Users

This one usually shaves off hundreds of megs of data. Update, upgrade, and then clean up those files you’re not going to use.

Update then remove old formulae and their folders:

You might have used brew prune in the past, but that has been deprecated. Cleanup handles this for you!

General Brew Maintenance

Brew is a complicated system, and no one knows it better than the maintainers. So you can run brew doctor and get some additional chores you could take care of to have it run properly.

Git Users

Git is great, but it’s not hard to leave a bunch of merged branches laying around on your local machine! Those branches aren’t useful anymore, and sometimes make naming conflicts for future branches.

You can remove all the merged branches from a single project with this command:

WOW, what a mouthful for only one project! Let’s make it worse. ?

This code will CD into all folders in the current working directory, and then run the command to clean merged branches for each!

JavaScript Developers

Delete OLD `node_modules` embedded in projects

The following command finds all node_modules folders older than 120 days and removes them. This does mean you will have to npm i or yarn again in those older projects. This is usually a huge cleanup!

Removes all node_modules folders older than 4 months:

If you’re feeling quite aggressive, you can just clear out ALL node_modules folders and re-install as needed, by removing the mtime flag.

Removes all node_modules folders:

Remove old versions of Node

Remove old versions of Node. This varies depending on your Node manager. I use ’n’ so it’s easy for me. Consult uninstall for your specific version manager.

Using n?
List all versions of node + your installed ones with n ls and then remove any with n rm <version>.
Using nvm?
List your installed versions with nvm ls and then remove any with nvm uninstall <version>.
Using asdf?
List your installed versions with asdf list nodejs and then remove any with asdf uninstall nodejs <version>.

Ruby Developers

Clean up old versions of Gems with the cleanup command. If you’re worried, you can see the results first with “dryrun”. Super smash flash 2 download ipad.

Then when you are confident, you can remove the “dryrun” param and run it for real.

Remove old versions of Ruby

This depends specifically on your Ruby version manager. We’ll do two popular versions to help you out.

Using rbenv?
List your installed versions with rbenv versions and then remove any with rbenv uninstall <version>.
Using rvm?
List your installed versions with rvm list and then remove any with rvm uninstall <version>.

Xcode Developers

Xcode loves to cache things all over your machine, and some of these are hundreds of megs. Time to clean them up, and if you need to rebuild them again, no worries!

Clean up CocoaPod caches:

Delete old Xcode Simulators:

Clean up various archives, logs, and derived data folders:

Check out your connected device info in ~/Library/Developer/Xcode/iOS Device Logs/ and delete anything for old iOS devices you’ve connected.

Docker

Play insaniquarium deluxe 2 online free. You can remove all volumes not used by at least one container. Because… why would you want those?!

This might be huge or it might remove nothing. Worth a run right!?

Remove unused local volumes

RESULTS?!

Don’t forget to empty your trash and check on how we did!

30 GIGS! pulled off my machine! How about you?

Your success is probably vastly different, but I’d love to know. Comment or tweet at me your results, and any other developer spots you recommend we clean! I’ll be happy to add your advice to the article.

Gant Laborde is Chief Technology Strategist at Infinite Red, published author, adjunct professor, worldwide public speaker, and a mad scientist in training. Clap/follow/tweet or visit him at a conference.

5 Things that Suck about Remote Work
The Pitfalls of Remote Work + Proposed Solutionsshift.infinite.redReact Native vs. Native
Should I learn React Native or Native?shift.infinite.red

Clean up your dev environment you filthy animal!

Ilove cleaning software? PLZ! Remove duplicates, find old OS cruft etc. But it never cleans a development machine as I can.

Sure, for general maintenance, nothing beats CleanMyMac. But once a year, developers should run through a few manual commands, because auto-cleaners won’t know how to take care of a developer machine.

Before we start, let’s look at how much “Free Space” you’re starting with:

Mine is reporting 132.2 GB before cleaning. Time to get started!

Mac Homebrew Users

This one usually shaves off hundreds of megs of data. Update, upgrade, and then clean up those files you’re not going to use.

Update then remove old formulae and their folders:

You might have used brew prune in the past, but that has been deprecated. Cleanup handles this for you!

General Brew Maintenance

Brew is a complicated system, and no one knows it better than the maintainers. So you can run brew doctor and get some additional chores you could take care of to have it run properly.

Git Users

Git is great, but it’s not hard to leave a bunch of merged branches laying around on your local machine! Those branches aren’t useful anymore, and sometimes make naming conflicts for future branches.

You can remove all the merged branches from a single project with this command:

WOW, what a mouthful for only one project! Let’s make it worse. ?

This code will CD into all folders in the current working directory, and then run the command to clean merged branches for each!

JavaScript Developers

Delete OLD `node_modules` embedded in projects

The following command finds all node_modules folders older than 120 days and removes them. This does mean you will have to npm i or yarn again in those older projects. This is usually a huge cleanup!

Removes all node_modules folders older than 4 months:

If you’re feeling quite aggressive, you can just clear out ALL node_modules folders and re-install as needed, by removing the mtime flag.

Removes all node_modules folders: For melodyne 4.

Remove old versions of Node

Remove old versions of Node. This varies depending on your Node manager. I use ’n’ so it’s easy for me. Consult uninstall for your specific version manager.

Using n?
List all versions of node + your installed ones with n ls and then remove any with n rm <version>.
Using nvm?
List your installed versions with nvm ls and then remove any with nvm uninstall <version>.
Using asdf?
List your installed versions with asdf list nodejs and then remove any with asdf uninstall nodejs <version>.

Ruby Developers

Clean up old versions of Gems with the cleanup command. If you’re worried, you can see the results first with “dryrun”.

Then when you are confident, you can remove the “dryrun” param and run it for real.

Clean Free Space Mac El Capitan

Remove old versions of Ruby

This depends specifically on your Ruby version manager. We’ll do two popular versions to help you out.

Using rbenv?
List your installed versions with rbenv versions and then remove any with rbenv uninstall <version>.
Using rvm?
List your installed versions with rvm list and then remove any with rvm uninstall <version>.

Xcode Developers

Xcode loves to cache things all over your machine, and some of these are hundreds of megs. Time to clean them up, and if you need to rebuild them again, no worries!

Clean up CocoaPod caches:

Delete old Xcode Simulators:

Clean up various archives, logs, and derived data folders:

Check out your connected device info in ~/Library/Developer/Xcode/iOS Device Logs/ and delete anything for old iOS devices you’ve connected.

Clean Free Space On Hard Drive

Docker

You can remove all volumes not used by at least one container. Because… why would you want those?!

This might be huge or it might remove nothing. Worth a run right!?

Clean Free Space Mac Os

Remove unused local volumes

Erase Free Space Mac Terminal

RESULTS?!

Don’t forget to empty your trash and check on how we did!

Erase Free Space Mac 2020

Space
30 GIGS! pulled off my machine! How about you?

Clean Space Mac Free

Your success is probably vastly different, but I’d love to know. Comment or tweet at me your results, and any other developer spots you recommend we clean! I’ll be happy to add your advice to the article.

Gant Laborde is Chief Technology Strategist at Infinite Red, published author, adjunct professor, worldwide public speaker, and a mad scientist in training. Clap/follow/tweet or visit him at a conference.

5 Things that Suck about Remote Work
The Pitfalls of Remote Work + Proposed Solutionsshift.infinite.redReact Native vs. Native
Should I learn React Native or Native?shift.infinite.red