Back to Home
Storage Optimization on MacOS for Developer

Storage Optimization on MacOS for Developer

The "System Size" Problem

full-storage.jpg

If you're a Mac user, you've probably noticed that mysterious "System Data" category eating up your storage space like a teenager raiding the fridge. While it sounds fancy, it's really just a folder where your Mac keeps its digital housekeeping stuff – think of it as your computer's junk drawer filled with caches and log files. For iOS developers, there's one particular storage glutton to watch out for: Xcode. This app-making toolkit is like that friend who comes to crash on your couch for a few days but somehow leaves their stuff everywhere. As you work, Xcode sprinkles temporary files and support documents all over your drive like breadcrumbs, quietly munching away at your available space. Don't worry, though – I will show you exactly what these files are and how to clean them up, so you can get back to building amazing apps without your Mac giving you the dreaded "disk full" warning.

Developer Storage

These files are created by Xcode during development.

Derived Data

Derived data is Xcode's workspace where it stores temporary files generated while building and indexing a project. This includes intermediate build files, generated indexes, module caches, logs, and symbol caches. It speeds up the build process and enables Xcode features like code completion and syntax highlighting. You can delete the entire Derived Data folder or selectively delete data for projects you are no longer working on. This folder is located at:

~/Library/Developer/Xcode/DerivedData

System Setting > General > Storage > Xcode Cache

xcode-cache.jpg

Xcode cache stores various temporary files that Xcode uses during development. It locates at:

~/Library/Developer/CoreSimulator/Caches

You can save tons of GBs when delete it if you're working on many huge projects.

Device Support

These files are necessary for Xcode to communicate with physical iOS devices connected to your Mac. They are created every time you connect a device with a new iOS version. These files are around 2.5 GB each. You can delete older versions; Xcode will regenerate them if needed. They are located in this directory:

~/Library/Developer/Xcode/iOS DeviceSupport/

Old Archives

Archives are the finished products of your apps, packaged up and ready for distribution. They include debug symbols which are needed to symbolicate crash logs. You should back them up, but you may not need to keep all of them locally. You can delete them through Xcode or in Finder. They are stored in the following directory, organized by the date they were created:

~/Library/Developer/Xcode/Archives/

SwiftUI Preview

SwiftUI previews generate temporary files to render the preview of your SwiftUI views.

  • Delete directly by removing this directory:
~/Library/Developer/Xcode/UserData/***Previews***
  • Or using command:
xcrun simctl --set previews delete all
  • If there is an error with simctl:
sudo xcode-select -s /Applications/Xcode.app
  • Note: Quit Xcode before doing the above steps.

System Storage

system-storage.jpg

Cache

The Cache directory stores data used by all installed applications, including Xcode. You may find large cache files for apps you no longer use. The Cache directory is located at:

~/Library/Caches

Old Core Simulator Devices

Simulator devices are virtual iOS devices used for testing apps during development. As new Xcode versions and new iOS versions are released, old simulator devices accumulate and take up a lot of space. It is safe to delete any devices that you don't use. Deleting unused simulator devices is one of the most effective ways to reclaim storage space. You can potentially free up between 20 GB to 150 GB by doing this. Simulator devices are located in this folder:

~/Library/Developer/CoreSimulator/Devices

You need to be careful, only delete the device you don't use any more. Or just reset them instead by select Simulator -> Device -> Erase All Content and Settings

erase.jpg

Introducing EZClean

If you're too lazy to manually do the above cleaning stuffs, try using EZClean. It's a tool designed to help iOS developers manage Xcode storage and reclaim disk space by suggesting you to delete unused and temporary files. EZClean can scan your system for files like old simulator devices, device support files, and derived data, ... and allow you to delete them safely and easily. Here's what makes EZClean your new best friend:

  • It's like having x-ray vision for your Mac – shows you where all your developer files are hiding
  • Does the cleanup for you by just one click
  • Hangs out in your menu bar like a helpful butler, ready to clean up whenever you need
  • Has a "Instant clean" button for those "oh crud, I'm running out of space" moments, right on your menu bar!
  • Completely free – no ads, no "upgrade to pro" popups, no nonsense

So go ahead – download it, give EZClean a spin and discover what life's like on the other side of developer stress. Instead of wrestling with storage warnings and playing hide-and-seek with rogue junk files, you can focus on what you actually signed up for: building cool apps.

Happy coding!