Skip to content

Instantly share code, notes, and snippets.

@mz0
Last active April 21, 2026 10:39
Show Gist options
  • Select an option

  • Save mz0/bca7fea50965e80445a64a308108d1ee to your computer and use it in GitHub Desktop.

Select an option

Save mz0/bca7fea50965e80445a64a308108d1ee to your computer and use it in GitHub Desktop.
uninstall the Xcode Command Line Tools (CLT) from your Mac, ensure no Update Prompt

To uninstall the Xcode Command Line Tools (CLT) from your Mac, you must manually delete the installation directory using the terminal, as Apple does not provide a built-in uninstaller.

1. Locate the Installation Path

Before deleting, confirm where the tools are installed on your system. Run this command in Terminal:

xcode-select -p  # output: /Library/Developer/CommandLineTools
  • Important: If the output shows /Applications/Xcode.app/Contents/Developer, you have the full Xcode app installed, and the tools are bundled within it. Deleting the folder below may not be necessary unless you specifically installed the standalone CLT package.

2. Uninstall the Tools

Execute the following command to remove the entire CLT directory. (You will be prompted to enter your macOS administrator password)

sudo rm -rf /Library/Developer/CommandLineTools

3. Reset the Path [1]

After deleting the folder, reset the active developer directory to ensure the system doesn't continue looking for tools in a location that no longer exists: [2]

sudo xcode-select -r

4. Verify Removal

Confirm that the tools are gone by running the version check again. You should receive an error stating that the active developer directory cannot be found:

xcode-select -p  # xcode-select: error: Unable to get active developer dir...

Troubleshooting: Persistent Update Prompts

If macOS still prompts you to update "Command Line Tools" even after removal, you may need to delete lingering receipt files.

This often requires temporarily disabling System Integrity Protection (SIP) or using Recovery Mode: [2]

  1. Boot into Recovery Mode (hold Power button on M1/M2/M3 or Cmd + R on Intel).
  2. Open Terminal from the Utilities menu.
  3. Navigate to the receipts folder and remove the relevant files: (Note: Your drive name may differ from "Macintosh HD").
    cd /Volumes/Macintosh\ HD/Library/Apple/System/Library/Receipts
    rm -rf com.apple.pkg.CLTools*
  4. Restart your Mac normally.

[1] https://medium.com
[2] https://apple.stackexchange.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment