<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sergey Nikiforov</title>
    <description>The latest articles on DEV Community by Sergey Nikiforov (@nixeton).</description>
    <link>https://dev.to/nixeton</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2966408%2Fc42318c5-aa2f-435c-89a1-ad4424688dc1.png</url>
      <title>DEV Community: Sergey Nikiforov</title>
      <link>https://dev.to/nixeton</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nixeton"/>
    <language>en</language>
    <item>
      <title>How to Clean Up Xcode and Free 30-50GB on Your Mac</title>
      <dc:creator>Sergey Nikiforov</dc:creator>
      <pubDate>Sat, 04 Apr 2026 18:52:02 +0000</pubDate>
      <link>https://dev.to/nixeton/how-to-clean-up-xcode-and-free-30-50gb-on-your-mac-3ogh</link>
      <guid>https://dev.to/nixeton/how-to-clean-up-xcode-and-free-30-50gb-on-your-mac-3ogh</guid>
      <description>&lt;p&gt;Xcode is the single biggest storage consumer on most developers' Macs. A fresh install starts around 35GB, but over months of development it quietly grows to 80, 100, even 150GB+. Most of that growth is invisible — cached build products, old simulators, debug symbols for iOS versions you no longer use.&lt;/p&gt;

&lt;p&gt;I've been building iOS apps for years, and this problem is exactly why I built &lt;a href="https://megacleaner.app" rel="noopener noreferrer"&gt;MegaCleaner&lt;/a&gt; — I got tired of manually tracking down these hidden folders every few months. But whether you use a tool or do it by hand, you should know where the space goes.&lt;/p&gt;

&lt;p&gt;This guide covers every Xcode storage category: what it is, where it lives, how big it typically gets, and whether it's safe to delete. No guesswork, no vague advice — just exact paths and clear safety levels.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Reference
&lt;/h2&gt;

&lt;p&gt;Before we dive in, here's the full picture. Bookmark this table — you'll want it next time your Mac complains about storage.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Typical Size&lt;/th&gt;
&lt;th&gt;Safe to Delete?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DerivedData&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/Library/Developer/Xcode/DerivedData&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;10-50 GB&lt;/td&gt;
&lt;td&gt;Yes — rebuilds automatically&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Simulators&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/Library/Developer/CoreSimulator/Devices&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;20-150 GB&lt;/td&gt;
&lt;td&gt;Yes for old versions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Archives&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/Library/Developer/Xcode/Archives&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;5-30 GB&lt;/td&gt;
&lt;td&gt;Yes if older than 6 months&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Device Support&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/Library/Developer/Xcode/iOS DeviceSupport&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;10-40 GB&lt;/td&gt;
&lt;td&gt;Yes for old iOS versions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Module/Doc Cache&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/Library/Developer/Xcode/DocumentationCache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1-5 GB&lt;/td&gt;
&lt;td&gt;Yes — regenerates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Old Xcode Versions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/Applications/Xcode*.app&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;12-30 GB each&lt;/td&gt;
&lt;td&gt;Verify first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CocoaPods Cache&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/Library/Caches/CocoaPods&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1-5 GB&lt;/td&gt;
&lt;td&gt;Yes — &lt;code&gt;pod install&lt;/code&gt; restores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SPM Cache&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/Library/Caches/org.swift.swiftpm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1-5 GB&lt;/td&gt;
&lt;td&gt;Yes — &lt;code&gt;swift package resolve&lt;/code&gt; restores&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Total potential savings: 30-150+ GB&lt;/strong&gt; depending on how long you've been developing.&lt;/p&gt;

&lt;p&gt;Now let's go through each one.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. DerivedData
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is:&lt;/strong&gt; Every time you build a project in Xcode, it stores compiled objects, indexes, logs, and debug info in a project-specific subfolder. These are named &lt;code&gt;ProjectName-uniqueID&lt;/code&gt; (the unique ID is a 28-character hash), so you can identify which project each folder belongs to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where it lives:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/Library/Developer/Xcode/DerivedData/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How big it gets:&lt;/strong&gt; 10-50 GB depending on how many projects you work on. Each active project adds 500 MB to several GB of build artifacts. Since Xcode never cleans these up automatically, they accumulate forever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to clean it:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From Terminal — delete everything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Developer/Xcode/DerivedData/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or selectively — delete a specific project's cache:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Developer/Xcode/DerivedData/MyProject-&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From Xcode — go to &lt;strong&gt;Settings &amp;gt; Locations&lt;/strong&gt;, click the small arrow next to the DerivedData path to open it in Finder, then select and delete the contents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it safe?&lt;/strong&gt; Yes. DerivedData is completely regenerated on your next build. The only cost is a slightly longer first build after cleaning — typically 1-5 minutes depending on project size. This is the single safest cleanup you can do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; If you're mid-project and don't want to rebuild everything, delete only the folders for projects you haven't touched in a while. The folder names include the project name, so it's easy to tell which is which.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Simulators and Runtimes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What they are:&lt;/strong&gt; iOS, watchOS, tvOS, and visionOS simulator instances — full virtual devices that Xcode uses for testing. Each runtime version (iOS 17.5, iOS 18.2, etc.) is a separate download, and each simulated device (iPhone 16 Pro, iPad Air, etc.) creates its own data folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where they live:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/Library/Developer/CoreSimulator/Devices/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How big they get:&lt;/strong&gt; This is typically the largest category — &lt;strong&gt;20-150 GB&lt;/strong&gt;. Each simulator runtime is 5-8 GB. If you've been developing through multiple iOS versions (17, 18, 26), the runtimes alone can be 30-50 GB. Add device data folders and it grows fast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to clean it:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, remove simulators for iOS versions that Xcode no longer supports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcrun simctl delete unavailable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List all installed simulators to see what you have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcrun simctl list devices
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Delete a specific simulator by its UUID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcrun simctl delete &amp;lt;UDID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remove old runtimes you no longer need:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcrun simctl runtime delete &lt;span class="s2"&gt;"iOS 17.5"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also manage simulators in Xcode: &lt;strong&gt;Window &amp;gt; Devices and Simulators&lt;/strong&gt;, then right-click any device to delete it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it safe?&lt;/strong&gt; For old iOS versions (more than 2 major versions behind), absolutely — you're never going to debug against iOS 16 when you're building for iOS 26. For current versions, it's safe but you'll need to re-download the runtime if you delete it (5-8 GB download).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch for orphans:&lt;/strong&gt; Sometimes simulator device folders survive crashes or manual cleanup attempts. These folders exist on disk but don't appear in &lt;code&gt;xcrun simctl list&lt;/code&gt;. They're dead weight — safe to delete.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Archives
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What they are:&lt;/strong&gt; .xcarchive bundles created every time you build for distribution (Product &amp;gt; Archive). Each archive contains the compiled app, debug symbols (dSYMs), and metadata. They're organized by date in subfolders like &lt;code&gt;2026-03-15/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where they live:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/Library/Developer/Xcode/Archives/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How big they get:&lt;/strong&gt; 5-30 GB. Individual archives range from 100 MB to 2+ GB depending on app size. If you archive regularly, this adds up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to clean it:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From Xcode — &lt;strong&gt;Window &amp;gt; Organizer &amp;gt; Archives&lt;/strong&gt;. Right-click an archive and select Delete.&lt;/p&gt;

&lt;p&gt;From Terminal — remove archives older than 6 months:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find ~/Library/Developer/Xcode/Archives &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*.xcarchive"&lt;/span&gt; &lt;span class="nt"&gt;-mtime&lt;/span&gt; +180 &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; +
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Is it safe?&lt;/strong&gt; For archives older than 6 months: yes. The main reason to keep archives is their dSYM files, which you need to symbolicate crash reports. If you've uploaded the build to App Store Connect, Apple retains the dSYMs — so your local copy is redundant.&lt;/p&gt;

&lt;p&gt;For recent archives of builds currently in production: keep them until you've confirmed the dSYMs are uploaded.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Device Support Files
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What they are:&lt;/strong&gt; Debug symbol caches that Xcode downloads when you connect a physical iPhone, iPad, or Apple Watch. They allow Xcode to symbolicate crash logs and debug on-device.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where they live:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/Library/Developer/Xcode/iOS DeviceSupport/
~/Library/Developer/Xcode/watchOS DeviceSupport/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Folder names follow the format &lt;code&gt;DeviceModel version (build)&lt;/code&gt; — for example, &lt;code&gt;iPhone15,3 17.4 (21E219)&lt;/code&gt;. In older Xcode versions, the format was just &lt;code&gt;17.4 (21E219)&lt;/code&gt; without the device model prefix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How big they get:&lt;/strong&gt; 10-40 GB. Each iOS version creates a 2-5 GB folder. If you've been developing through several iOS releases, these pile up fast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to clean it:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just delete the folders for old iOS versions you're no longer debugging against:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Developer/Xcode/iOS&lt;span class="se"&gt;\ &lt;/span&gt;DeviceSupport/&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="se"&gt;\ &lt;/span&gt;16.&lt;span class="k"&gt;*&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Developer/Xcode/iOS&lt;span class="se"&gt;\ &lt;/span&gt;DeviceSupport/&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="se"&gt;\ &lt;/span&gt;17.&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the folders matching the iOS versions currently on your devices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it safe?&lt;/strong&gt; For old versions (2+ major versions behind your current iOS): completely safe. These are cached copies — Xcode will re-download them if you ever connect a device running that version again. For your current iOS version: keep it, or you'll trigger a re-download next time you plug in your device.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Module and Documentation Cache
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is:&lt;/strong&gt; Pre-built module indexes and documentation caches that Xcode creates for quick access to API docs and symbol lookup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where they live:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/Library/Developer/Xcode/DocumentationCache/
~/Library/Developer/Shared/Documentation/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How big they get:&lt;/strong&gt; 1-5 GB combined. Not the biggest offender, but easy to clean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to clean it:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Developer/Xcode/DocumentationCache/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Developer/Shared/Documentation/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Is it safe?&lt;/strong&gt; Yes. These are fully auto-regenerated by Xcode when needed. No downsides.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Old Xcode Versions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is:&lt;/strong&gt; If you've ever installed multiple Xcode versions side-by-side (common when testing against beta versions or maintaining legacy projects), the old versions may still be sitting in your Applications folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to find them:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check which Xcode is your active version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcode-select &lt;span class="nt"&gt;-p&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This returns something like &lt;code&gt;/Applications/Xcode.app/Contents/Developer&lt;/code&gt; — meaning &lt;code&gt;Xcode.app&lt;/code&gt; is your active version.&lt;/p&gt;

&lt;p&gt;Now check for other Xcode installations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; /Applications/Xcode&lt;span class="k"&gt;*&lt;/span&gt;.app
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; ~/Applications/Xcode&lt;span class="k"&gt;*&lt;/span&gt;.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How big they get:&lt;/strong&gt; 12-30 GB &lt;strong&gt;per version&lt;/strong&gt;. Having Xcode 15 and Xcode 16 both installed wastes 25-35 GB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to clean it:&lt;/strong&gt; Move the old versions to Trash. If you're sure you don't need them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /Applications/Xcode-15.4.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Is it safe?&lt;/strong&gt; Only if you no longer need the old version. Some developers keep older Xcode versions for building against older SDKs or submitting to the App Store with specific toolchain requirements. Verify before deleting.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. CocoaPods and SPM Caches
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What they are:&lt;/strong&gt; Cached downloads and build artifacts from dependency managers — CocoaPods and Swift Package Manager.&lt;/p&gt;

&lt;h3&gt;
  
  
  CocoaPods
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/Library/Caches/CocoaPods/          &lt;span class="c"&gt;# Downloaded pod cache&lt;/span&gt;
~/.cocoapods/repos/                   &lt;span class="c"&gt;# Spec repositories&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clean with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Caches/CocoaPods
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/.cocoapods/repos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restore with &lt;code&gt;pod install&lt;/code&gt; in your project. Specs restore with &lt;code&gt;pod repo update&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Swift Package Manager
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/Library/Caches/org.swift.swiftpm/   &lt;span class="c"&gt;# Package cache&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clean with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/Library/Caches/org.swift.swiftpm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restore with &lt;code&gt;swift package resolve&lt;/code&gt; in your project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project-level folders
&lt;/h3&gt;

&lt;p&gt;Don't forget per-project &lt;code&gt;Pods/&lt;/code&gt; directories and &lt;code&gt;.build/&lt;/code&gt; folders in Swift packages. These can be large but are fully regenerated by their respective dependency managers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Combined size:&lt;/strong&gt; 1-10 GB depending on how many projects you work on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it safe?&lt;/strong&gt; Yes. Dependency manager caches are fully regenerated. The only cost is re-download time on your next &lt;code&gt;pod install&lt;/code&gt; or &lt;code&gt;swift package resolve&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What NOT to Delete
&lt;/h2&gt;

&lt;p&gt;Not everything should be deleted at once. Here's what to keep:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Active project DerivedData.&lt;/strong&gt; If you're in the middle of working on a project, deleting its DerivedData means a full rebuild — which can take 5-30 minutes on large projects. Clean stale projects, keep active ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SPM package cache on slow connections.&lt;/strong&gt; The &lt;code&gt;~/Library/Caches/org.swift.swiftpm&lt;/code&gt; directory caches all downloaded packages. On a slow network, re-downloading everything takes time. If bandwidth isn't an issue, delete freely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Current iOS Device Support.&lt;/strong&gt; If you're actively debugging on a device running iOS 18.5, keep the &lt;code&gt;18.5 (...)&lt;/code&gt; folder. Deleting it means Xcode will need to re-download it the next time you connect your device.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recent archives you haven't uploaded.&lt;/strong&gt; If you archived a build for App Store distribution but haven't submitted it yet, you need that archive. Once it's uploaded to App Store Connect, the local copy is safe to delete.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Automated Way
&lt;/h2&gt;

&lt;p&gt;If hunting through all these paths manually every few months sounds tedious — it is. That's exactly why I built &lt;a href="https://megacleaner.app" rel="noopener noreferrer"&gt;MegaCleaner&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;MegaCleaner scans all 6 Xcode storage categories (DerivedData, simulators, archives, device support, docs, old versions) plus CocoaPods and SPM caches — and it doesn't stop at Xcode. It covers 29 tools total (21 developer tools + 8 system categories), including Docker, node_modules, Python environments, Rust/Cargo, Homebrew, and more.&lt;/p&gt;

&lt;p&gt;How it works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scan is free&lt;/strong&gt; — see exactly how much space each tool wastes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confidence levels&lt;/strong&gt; — every item is marked as "definitely safe" (like DerivedData), "probably safe" (like old archives), or "verify first" (like old Xcode versions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One click&lt;/strong&gt; — select what to clean, hit Clean, done. Everything goes to Trash (undoable)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$49 one-time&lt;/strong&gt; — not a subscription&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you only care about Xcode cleanup, &lt;a href="https://apps.apple.com/app/devcleaner-for-xcode/id1388020431" rel="noopener noreferrer"&gt;DevCleaner for Xcode&lt;/a&gt; is a solid free alternative. It covers similar Xcode categories but doesn't touch other dev tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tool Comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;MegaCleaner&lt;/th&gt;
&lt;th&gt;DevCleaner&lt;/th&gt;
&lt;th&gt;CleanMyMac&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Price&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$49 one-time&lt;/td&gt;
&lt;td&gt;Free (tip jar)&lt;/td&gt;
&lt;td&gt;$90/year&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Xcode cleanup&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;6 sub-features&lt;/td&gt;
&lt;td&gt;6 categories&lt;/td&gt;
&lt;td&gt;Basic cache only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Other dev tools&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;20 more (Docker, npm, Python...)&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Safety levels&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3 confidence tiers&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Open source&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes (GPL-3)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dev tool intelligence&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes — 21 dev tool scanners&lt;/td&gt;
&lt;td&gt;Xcode only&lt;/td&gt;
&lt;td&gt;No dev awareness&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Xcode can quietly consume 30-100+ GB of your disk without any visible sign. At a minimum, do this quarterly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Delete DerivedData&lt;/strong&gt; for stale projects — instant win, zero risk&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove old simulator runtimes&lt;/strong&gt; — usually the biggest savings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean Device Support&lt;/strong&gt; for old iOS versions — easy 10-20 GB&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for old Xcode versions&lt;/strong&gt; in /Applications — 12-30 GB each&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The manual cleanup takes 10-15 minutes if you follow this guide. Or scan with &lt;a href="https://megacleaner.app" rel="noopener noreferrer"&gt;MegaCleaner&lt;/a&gt; and do it in under a minute.&lt;/p&gt;

&lt;p&gt;Either way, your Mac will thank you.&lt;/p&gt;

</description>
      <category>xcode</category>
      <category>macos</category>
      <category>ios</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
