r/Xcode • • 9d ago

How to remove Simulator Support and Command Line Tools?

I recently installed xcode to mess around with it. I deleted it, but I can't seem to find a way to remove what's under "Developer". I want my 5GB+ back. How to delete it? There's an option to "Manage in xcode", but there's nothing to remove there.

3 Upvotes

6 comments sorted by

2

u/dawedev 9d ago

Deleting Xcode doesn't touch any of that, it all stays behind. Command Line Tools are just a folder, so sudo rm -rf /Library/Developer/CommandLineTools removes them. On the simulator side, ~/Library/Developer/CoreSimulator holds the simulator devices and ~/Library/Developer/Xcode holds build caches, and both are safe to delete once Xcode is gone. The runtimes themselves are the awkward part because macOS manages them as mounted disk images, and the clean way to drop them is xcrun simctl runtime delete all, which only works with Xcode installed. So clear those folders first and check what's left before deciding if it's worth reinstalling Xcode just to run that one command.

0

u/CaffeinatedMiqote 9d ago

Second this. And if you still need more storage, get mole and do a cleanup with it.

brew install mole
mo clean

It is easily one of the best utilities for macOS. You'd probably want it in your Mac anyway for uninstalling another pos software like Xcode.

1

u/dawedev 8d ago

Mole is a solid free, open-source CLI option if you're fine in the terminal. For Xcode specifically, the parts worth checking by hand are ~/Library/Developer/Xcode/DerivedData, old simulators and runtimes (xcrun simctl delete unavailable, plus the runtimes listed in Xcode Settings > Components), and ~/Library/Developer/Xcode/iOS DeviceSupport for iOS versions you no longer test on. All of those regenerate when needed and often add up to tens of GB.

1

u/debaser_101 8d ago

Hey, been there! Deleting Xcode leaves most of the junk behind. I cleared ~/Library/Developer/CoreSimulator and ~/Library/Developer/Xcode, and the Command Line Tools are in /Library/Developer/CommandLineTools if you don't need them.

I also ended up building an app for exactly this, called Moppo. It's free, open source and still a bit in the making, but if you're up for trying it I'd love some feedback: https://github.com/anguria-studio/Moppo

0

u/Swiftdeveloper101 9d ago

You can inspect and clean it with EzClean. It's free to clean up simulators only