Full uninstall: Xcode removal

Xcode is an Apple-created developer's toolkit for iOS and macOS app development. Xcode is one of the best tools for developers, but projects can take up a lot of space on your Mac hard disk.

The app also generates a lot of "temporary" cache files that will grow over time until they become a hidden monolith of space waste. More than just wasting space, the junk can slow Xcode down, sometimes making it non-responsive.

When this happens, you need to clean Xcode by completely removing old cache files and the app itself before doing a fresh Xcode install.

If you think you don't need help uninstalling Xcode, think again. A normal uninstall will not remove all the cache junk.

So to be very clear, when removing Xcode, do not just move the icon to the Trash bin. This doesn't uninstall the Xcode app completely, only parts of it. Caches, supporting files, your old builds, and so on — will remain on your drive in multiple directories and libraries.

Don't worry; we'll show you how to safely and, most importantly, completely remove Xcode from your Mac.

Xcode icon

How to uninstall Xcode manually

If you want to get your hands dirty, then you've come to the right place, but before you start, please note the following:

Manually removing files comes with some risk. If you don't follow the instructions carefully, you could experience unintended consequences. We assume no responsibility for what may occur from a manual app removal.

If you're up for the challenge, please carry on. If you would prefer the safer methods, go ahead and skip this section.

Now that we've cleared this up, here’s how to get Xcode off your Mac by hand:

  1. Open the Applications folder.
  2. Drag the Xcode icon to the Trash.
  3. Clean out the Trash bin.

This will delete the main part of the app. Now, to the rest of the Xcode files.

  1. Open Finder.
  2. In the top menu, choose Go.
  3. Go to Folder...
  4. Enter the following location and press Go: ~/Library/Developer/
  5. Find the Developer folder.
  6. Delete it.

If you had earlier versions of Xcode, like 7 or 8, they leave footprints all over the place. To remove these remnants of old Xcode iterations, follow these steps:

  1. Open Terminal.
  2. Run: sudo /Developer/Library/uninstall-devtools --mode=all
  3. Confirm your admin password.
  4. Wait until the scripts are done running.
  5. Quit Terminal.

The only thing left is getting rid of Xcode application caches. In some versions of the app, they are left even after the purging, so visit this directory to make sure you have no files stored there:

~/Library/Caches/com.apple.dt.Xcode

If you find any files, clean up the folder.

Once all traces of Xcode have been removed, reinstall the app, and you should enjoy a much faster experience. You’ll also have more space on your hard disk to play with.

How to quickly remove old Xcode build files

If you think the manual method sounds too risky and complicated, we’re going to show you a much better way to remove old Xcode build files. No need for dirty hands and crossed fingers; you just need to download an uninstaller app like CleanMyMac X.

Follow these steps to remove old Xcode build files easily:

  1. Launch CleanMyMac X.
  2. Go to System Junk and click Scan.
  3. When the scan finishes, click on Review details.
  4. If you only want to clear Xcode files, click Deselect All before you start.
  5. Now click on Xcode Junk.
  6. Select old iOS simulators, Xcode Derived Data (the old project builds), and old caches you don’t need anymore.
  7. Click Clean.
CleanMyMac X - Xcode junk in System Junk module

In the example above, we were able to free up almost 15GB of wasted space. Not bad for a couple of minutes of work. Can you do even better?

How to quickly remove Xcode

The fastest way to get an Xcode-free Mac is to download CleanMyMac X for free and use its uninstaller tool. This way, the whole process will only take a couple of minutes, and you won’t have to worry about the leftover files or delete the wrong thing with manual removal.

Here’s how it works:

  1. Launch CleanMyMac X.
  2. Go to Uninstaller.
  3. Find Xcode on the list and select it.
  4. Click Uninstall.
All apps selected in the Uninstaller module of CMMX

Now, dealing with caches and stray parts:

  1. Choose the System Junk tab.
  2. Run Scan.
  3. Click Review Details.
  4. Scroll to the bottom and choose Xcode junk.
  5. Hit Clean.
CleanMyMac X - User cache files in System Junk module

Xcode junk removed

Whether you want to uninstall Xcode completely or just get rid of old Xcode junk, we recommend you take action. You’ll gain more storage space and a lighter, cleaner, and faster Xcode experience.

Whether you use manual folder-crawl or take the safe approach with CleanMyMac’s quick click fixes, just do it!

Laptop with CleanMyMac
CleanMyMac X

Your Mac. As good as new.