< The MacPaw How-tos

How to Uninstall Xcode on macOS


The complete Xcode removal guide

Xcode is an Apple-created developer’s toolkit for iOS and macOS app development. In case for some reason you need to get rid of it, you’re at the right place. In this article we’ll explain how to safely and, most importantly, completely remove Xcode and all of the files that go with it from your Mac.

The first thing you need to know is this: do not just move Xcode icon into the Trash bin. This doesn’t uninstall 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.

There are two ways to remove Xcode: the easy one and the hard one. The easy one is with and uninstaller. Since Macs don’t have a proper uninstallation tool, you’ll have to resort to third-party apps, like CleanMyMac 3. We’ll explain how to use its uninstaller in a bit. The hard way to delete Xcode app is to do it manually and go over all leftover directories one by one.

How to quickly remove Xcode

The fastest way to get an Xcode-free Mac is to download CleanMyMac 3 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 parts. Here’s how it works:

  1. Launch CleanMyMac 3.
  2. Click on the Uninstaller tab.
  3. Find Xcode on the list and select it.
  4. Click Uninstall.

Uninstaller tool

Now, dealing with caches and stray parts:

  1. Choose System Junk tab.
  2. Run Scan.
  3. Click Review Details.
  4. Scroll to the bottom and choose Xcode junk.
  5. Hit Clean.

Clean up Xcode junk

That’s it, now you have performed a complete Xcode uninstall on your Mac and none of its parts and caches remain on your hard drive.

How to uninstall Xcode manually

Before we proceed there’s an important note we have to make: you undertake this uninstallation on your own risk, we do not assume responsibility for the consequences of manual app removal. Using an app uninstalling tool is a much more advisable option for the procedure.

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 up 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. ~/Library/Developer/
  5. Find the Developer folder.
  6. Delete it.

Delete Xcode from Library

If you had earlier versions of Xcode, like 7 or 8, they leave footprints all over the place, so you’ll have to continue cleaning, now in Terminal.

  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.

Delete Xcode in 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.


In case you do, clean up the folder.

As you can see, Xcode manual cleaning is a long and painstaking process, which sometimes can result in the loss of data you still needed. So save yourself time and energy by using CleanMyMac for the job. It’s ten times faster and easier with a designated tool rather then manual folder-crawl.

We hope this article has been of help. Have a good day!

CleanMyMac 3
How to clean and optimize your Mac?
That's easy. With CleanMyMac 3.
Download Free