Skip to content

The Command Line Tools are not small, and they are not Xcode

What the Command Line Tools install, how big they are, and when you can have them instead of the full Xcode.

4 min read

Plenty of Macs have the full Xcode installed because something asked for a compiler once. The Command Line Tools are a much smaller package that satisfies most of those requests, and knowing which you need is worth around 20 GB.

What each one gives you

Command Line ToolsFull Xcode
SizeA few GBAround 20 GB, plus simulators
Compilers and gitYesYes
Headers and SDKYesYes
SimulatorsNoYes, several GB each
Interface builder and the IDENoYes
Building iOS appsNoYes

What you have right now

xcode-select -p
xcodebuild -version 2>/dev/null
du -sh /Library/Developer/CommandLineTools /Applications/Xcode.app 2>/dev/null

If xcode-select -p points inside Xcode.app, the full install is what your tools are using. If it points at /Library/Developer/CommandLineTools, you already have the smaller setup.

Switching to the smaller one

  1. Confirm nothing you do requires the full Xcode: iOS or Mac app development, simulators, or Interface Builder.
  2. Install the Command Line Tools with xcode-select --install.
  3. Point the toolchain at them with sudo xcode-select -s /Library/Developer/CommandLineTools.
  4. Remove Xcode.app from Applications, and then its caches.
sudo xcode-select -s /Library/Developer/CommandLineTools
sudo rm -rf /Applications/Xcode.app   # after moving it to the Trash first

The folders Xcode leaves behind

Removing the application does not remove DerivedData, archives, device support or simulator runtimes, which is the whole point of those guides. On a Mac where Xcode is going away entirely, those folders are the larger half of the reclaim, and simulator runtimes stored as system assets are larger again.

Common questions

Do I need full Xcode or just the Command Line Tools?

The Command Line Tools are enough for compilers, git, headers and most build tooling. Full Xcode is needed for iOS and Mac app development, simulators and Interface Builder.

How much space do the Command Line Tools use?

A few gigabytes, compared with around 20 GB for Xcode itself before simulators and caches. On a Mac that only needs a compiler, that difference is worth reclaiming.

How do I switch from Xcode to the Command Line Tools?

Install them with xcode-select --install, point the toolchain at them with sudo xcode-select -s /Library/Developer/CommandLineTools, then remove Xcode and its caches.

Does removing Xcode free all its space?

No. DerivedData, archives, device support and simulator runtimes stay behind, and on a developer Mac those are frequently larger than the application itself.

Read next