Clean Up Xcode and Reclaim Gigabytes: A Developer's Guide

November 18, 2025Nam Tran3 min read
XcodeDeveloperTutorialSwift

The Xcode Storage Problem

If you're an iOS or macOS developer, you've probably noticed Xcode silently consuming massive amounts of disk space. It's not uncommon for Xcode-related files to grow to 50GB, 100GB, or even more!

Where Does All That Space Go?

DerivedData (5-50GB+)

Located at ~/Library/Developer/Xcode/DerivedData, this folder contains:

  • Build products and intermediate files
  • Index data for code completion
  • Module caches

Safe to clean? Yes! Xcode rebuilds what it needs.

iOS Device Support (10-30GB+)

Found at ~/Library/Developer/Xcode/iOS DeviceSupport, these are debug symbols for every iOS version you've connected.

Safe to clean? Yes, for iOS versions you no longer test on.

Simulator Runtimes (2-8GB each)

Each iOS Simulator runtime takes significant space.

Safe to clean? Remove simulators for iOS versions you don't need.

Archives (Variable)

Old app archives in ~/Library/Developer/Xcode/Archives can accumulate.

Safe to clean? Yes, if you've already submitted or don't need old builds.

Caches (1-10GB)

Various caches in ~/Library/Caches/com.apple.dt.Xcode.

Safe to clean? Yes, completely safe.

Using DiskCleanKit for Xcode Cleaning

DiskCleanKit Dashboard for Developers
DiskCleanKit Dashboard for Developers

Method 1: One Touch Clean

DiskCleanKit's One Touch Clean automatically detects and removes:

  • Xcode caches
  • Old build data
  • Temporary files

This is the safest option for regular maintenance.

Method 2: Developer Tools Module

1. Open DiskCleanKit

2. Go to Deep Scan

3. Select Developer Tools category

4. Run the scan

You'll see a detailed breakdown:

  • DerivedData size and contents
  • Device Support files by iOS version
  • Archives with dates
  • Cache sizes

Method 3: Targeted Cleaning

For specific cleaning:

1. Use Deep Scan's three-panel view

2. Expand the Developer category

3. Select specific items to remove

4. Preview before deleting

Step-by-Step: Major Xcode Cleanup

Before You Start

1. Quit Xcode completely

2. Back up critical archives if needed

3. Note any ongoing builds

The Cleanup Process

1. Open DiskCleanKit and run Deep Scan

2. Wait for complete analysis

3. Review the Developer Tools section

4. Expand each subcategory to review:

  • DerivedData folders (usually all safe to remove)
  • Device Support (keep only current iOS versions)
  • Archives (keep recent submissions)
  • Caches (all safe to remove)

5. Select items to clean

6. Click Clean Selected

7. Review the summary

After Cleaning

  • Open Xcode - it will rebuild indexes as needed
  • First build may take longer (rebuilding DerivedData)
  • Simulators will redownload if needed
Scan Summary After Cleaning
Scan Summary After Cleaning

Automating Xcode Maintenance

Weekly Cleanup Routine

Set a reminder to run One Touch Clean weekly. This prevents massive accumulation.

Before Major Updates

Clean before updating Xcode or macOS. This prevents conflicts and reduces update time.

Project-Specific Cleaning

When archiving a project:

1. Clean the project's DerivedData

2. Remove unused simulators

3. Archive only what you need

How Much Space Can You Recover?

Typical results from our users:

  • Light users: 5-15GB
  • Regular developers: 20-40GB
  • Heavy users with multiple Xcode versions: 50-100GB+

Pro Tips

  • Don't clean during builds - Wait for compilation to finish
  • Keep current iOS DeviceSupport - You need it for debugging
  • Regular maintenance beats deep cleaning - Weekly One Touch Clean prevents buildup
  • Check before major releases - Ensure you have archived what you need

Your Mac will thank you for the extra space, and Xcode will run more smoothly!

Share this article

Nam Tran

Nam Tran

Founder & Developer

With 20+ years in software development, I'm the founder of DiskCleanKit, eSpaceReading, English For Kids, and more. I'm passionate about creating useful apps that are helpful to everyone. When I'm not coding, you'll find me playing ping pong, chess, or relaxing on a sunny beach with family. Always thinking about the next interesting and helpful app to build!

CodingPing PongChessBeach Days

Ready to Clean Your Mac?

Try DiskCleanKit today and reclaim your disk space. One Touch Clean, Widgets, Disk Manager, and more.

Life Outside of Coding

A glimpse into my personal life - chess and family time at the beach

Chess Championship
Chess Championship
Beach with Family
Beach with Family
Kids at the Beach
Kids at the Beach