5

I recently got a new M1 MacBook which I migrated to using Migration Assistant. As part of the migration, the old XCode command-line tools seem to have made their way over, install receipts and all; now, the Software Update system preference always shows there being updates available on multiple versions of the XCode Command-Line Tools. Every time I tell the system to update, it seems to redownload and reinstall the updates for all three versions, but then it once again prompts to update. Similar things happen if I use the commandline softwareupdate tool:

grace:~ $ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
grace:~ $ softwareupdate --install -a
Software Update Tool

Finding available software

Downloading Command Line Tools for Xcode
Downloading Command Line Tools beta 4 for Xcode
Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Downloaded Command Line Tools beta 4 for Xcode
Installing Command Line Tools for Xcode, Command Line Tools beta 4 for Xcode, Command Line Tools for Xcode

I'd like to completely reinstall the XCode Command-Line Tools so that software update no longer attempts to update it, and so that I can properly reinstall. However, if I just sudo rm -rf /Library/Developer/CommandLineTools, the system still thinks they're installed, and for example xcode-select --install tells me that they're already installed, and xcode-select --reset has no effect on this.

What do I need to do on macOS 12 to completely remove the XCode Command-Line Tools so that I can do a fresh reinstall, short of reformatting my whole laptop?

5
  • This might help: apple.stackexchange.com/questions/328034/… Apr 19, 2022 at 14:17
  • Unfortunately that isn’t where macOS stores the developer tools update information anymore.
    – fluffy
    Apr 20, 2022 at 15:23
  • I have this exact same issue. Did you ever solve it?
    – SeverusD
    Jun 9, 2022 at 9:09
  • I wonder @SeverusD if this hokey pokey is needed now.
    – bmike
    Jun 9, 2022 at 9:17
  • It eventually stopped happening for me but I can’t remember if I did anything myself. I want to say it was just waiting for a macOS update that did the trick. Not a satisfying resolution, I know…
    – fluffy
    Jun 10, 2022 at 16:05

1 Answer 1

0

I would try removing the receipt from /Library/Apple/System/Library/Receipts as described in this answer first.

If that fails, this multi step “hokey pokey” type process might help. I would try to avoid messing with SIP personally as it doesn’t make sense this install would wedge itself in that hard.

In the mean time, applying updates might help rebuild the database or obsolete all the old command line tools if you don’t mind keeping on the recent update train.

2
  • As I stated in the comments, I didn’t find any receipts in that directory.
    – fluffy
    Jun 10, 2022 at 16:03
  • If the hokey pokey doesn’t work, you might have to live with it since an erase and reinstall is the way to make a clean receipts database and you’ve ruled that out @fluffy
    – bmike
    Jul 9, 2022 at 10:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .