Xcode is an Apple-created developer's toolkit for iOS and macOS app development. It is one of the best tools for developers, but projects can take up more than 100 GB of space. More than just wasting space, the junk can slow Xcode down and make it non-responsive. When that happens, you need to clean Xcode by completely removing old cache files and the app itself before doing a fresh Xcode install. We'll show you the correct way to do it.

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:
- Open the Applications folder.
- Drag the Xcode icon to the Trash.
- Clean out the Trash bin.

This will delete the main part of the app. Now, to the rest of the Xcode files.
- Open the Finder.
- In the top menu, choose Go.
- Go to Folder...
- Enter the following location and press Return:
~/Library/Developer/
- Find the Developer folder.
- 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:
- Open Terminal.
- Run:
sudo /Developer/Library/uninstall-devtools --mode=all
- Confirm your admin password.
- Wait until the scripts are done running.
- 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. It comes with a smart Cleanup feature that quickly finds unneeded files and lets you remove them with a click.
Here's how to remove old Xcode build files easily:
- Open CleanMyMac — get your free trial here.
- Go to Cleanup and click Scan.
- When the scan finishes, click Review All Junk.
- If you only want to clear Xcode files, find Xcode junk in the middle pane.
- Select files you no longer need and click Clean Up.


In the example above, we were able to free up almost 32 GB of wasted space. Not bad for a couple of minutes of work. Can you do even better?
How to quickly remove Xcode
CleanMyMac comes with another tool that can help you quickly uninstall Xcode — the Applications feature. It hunts down all app-related files. 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 to save yourself from the pain of manual Xcode removal:
- Open CleanMyMac.
- Go to Applications and run a scan.
- Click Manage My Applications and find Xcode on the list of all apps in the Uninstaller section.
- Select Xcode and any other apps you no longer need and click Uninstall.


Why and when uninstall Xcode?
As we already mentioned, one reason for uninstalling Xcode is that its cache has grown huge. If the app slowed down, it is also a good explanation of why you may want to remove it. But there are some other situations in which you may need to uninstall Xcode:
- You no longer need it — you either switched to another tool or stopped developing.
- Troubleshooting. Uninstalling can solve all kinds of issues, from Xcode crashing to build errors.
- Updating Xcode. Sometimes, if you cannot upgrade Xcode, uninstalling it is an easy way to address the problem.
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!