Question How to delete Xcode completely?

Please provide comments and solutions that are helpful to the author of this topic.

polar_bear

Level 1
Thread author
Jul 25, 2025
19
28
27
Hello everyone, I recently got the macbook air from my brother, as he has upgraded. He is a developer, and saw an app called Xcode in the Mac, which was considerably taking too much space, and I searched for what that is, then I found out it is an IDE and not useful for me (obviously). So, I deleted the app, but I think it is not deleted completely, and space is not getting completely available. I saw some tutorials but I’m still confused, please help me with this.
 
Hello everyone, I recently got the macbook air from my brother, as he has upgraded. He is a developer, and saw an app called Xcode in the Mac, which was considerably taking too much space, and I searched for what that is, then I found out it is an IDE and not useful for me (obviously). So, I deleted the app, but I think it is not deleted completely, and space is not getting completely available. I saw some tutorials but I’m still confused, please help me with this.
Hello polar_bear,

Welcome to the forums! Sounds like you're dealing with some leftover cruft from Xcode on your MacBook Air. You're right—it's Apple's integrated development environment (IDE) for building apps, and if you're not a developer, it's basically just eating up space. Deleting the app bundle itself (by dragging it to the Trash) is a good start, but macOS apps like Xcode often leave behind associated files, caches, libraries, and command-line tools that don't get removed automatically. That could explain why you're not seeing the full space savings.

Let me walk you through a safe way to fully uninstall it. Important note: Before doing anything, make sure you back up any important data (Time Machine is great for this). Also, if you're not comfortable with Terminal, you can skip those steps and just focus on the basics—Xcode remnants aren't harmful, just space hogs.

  1. Basic uninstall (what you probably already did):
    Drag the Xcode app from your Applications folder to the Trash, then empty the Trash. Restart your Mac afterward to see if that frees up more space. Check your storage in About This Mac > Storage to confirm.
  2. Remove additional Xcode files manually:
    Xcode installs stuff in places like /Library/Developer and ~/Library/Developer. You can delete these if you're sure you don't need them:
    • Open Finder, go to /Library/Developer (use Go > Go to Folder and type that in).
    • Delete the contents, but be careful—only remove Xcode-related folders.
    • Do the same for ~/Library/Developer (the tilde ~ means your user folder).
    If you're hesitant, apps like AppCleaner (free) can help scan and remove associated files safely.
  3. Uninstall command-line tools (if installed):
    Xcode often comes with CLI tools. Open Terminal (in Applications > Utilities) and run:
    Code:
    xcode-select --install
    If it's already installed, you can remove it with:
    Code:
    sudo rm -rf /Library/Developer/CommandLineTools
    (You'll need your admin password for sudo.)
  4. Clear caches and check for leftovers:
    Empty your Trash again, then go to ~/Library/Caches and look for any com.apple.dt.Xcode folders—delete those. Restart and check storage again.
  5. Verify space savings:
    After everything, run Disk Utility (in Applications > Utilities) > First Aid on your drive to ensure no issues. If space still seems off, it might be something else like system caches—try restarting in Safe Mode (hold Shift during boot) to clear temporary files.

If none of this works or you run into errors, could you share more details? Like your macOS version (check in About This Mac) or a screenshot of your storage breakdown? That'll help narrow it down.

Hope this gets your MacBook Air breathing easier—let us know how it goes! 😊
 
Hey guy, I was getting confused while deleting the xcode’s leftovers through command line tools, so I researched on that in the last 2-3 days and found the solution here, and now I am able to delete the xcode completely with the help of Devcleaner. Just want to share my findings, if anyone needs help on this.
 

You may also like...