4

Homebrew seemed to have installed Command Line Tools when I was trying ntfs-3g on Big Sur. I have since given up on this attempt to connect NTFS to my Mac.

Now I'm currently receiving prompts to update CLT for Xcode 12.5 (482.1 MB) from System Preferences. Since I have no use for it, I've been trying to uninstall it. I tried removing /Library/Developer/CommandLineTools but the update prompts continue even after a reboot. I have restored the folder and xcode-select -p now points to that folder again.

This older question for pre-Big Sur versions of Mac points out that I should check pkgutil; did so and pkgutil --pkgs shows that the receipts are still there. One of the comments on the first answer said that the folder for the receipts are not in /var/db/receipts or /Library/Receipts (and indeed they aren't), but in /Library/Apple/System/Library/Receipts (and indeed they're there).

The accepted answer in the other question (I mentioned above) says that I should disable SIP and delete the boms, then re-enable SIP. Another commenter said that I can remove the receipt files through Recovery Mode & Disk Utility, without disabling SIP. In Big Sur, though, that directory is protected by SSV. "Disabling" SSV forever through csrutil just to delete some receipts seems like an utterly terrible idea.

So, a question:

  1. Since I can't seem to uninstall CLT cleanly via deleting the folder, and System Preferences still wants me to update even after deleting the folder, what is the best way to go about this uninstallation at all?

Thank you.

5
  • Typically, I remove Xcode one by one, then start again at the top on removal of non Xcode based command line tools before jumping to the procedure you linked. Are there one or.more versions of Xcode installed?
    – bmike
    Commented Oct 6, 2021 at 9:50
  • @bmike I didn't have Xcode, just the Command Line Tools. I've tried removing /Library/Developer/CommandLineTools, didn't work, System Preferences still wanted to update. Receipts found at /Library/Apple/System/Library/Receipts and nowhere else.
    – jonvyltra
    Commented Oct 6, 2021 at 13:41
  • 1
    Did removing not work, or did you actually remove the directory but System Preferences still wants to update? In the second case, did a reboot help?
    – nohillside
    Commented Oct 6, 2021 at 15:07
  • @nohillside I removed the directory and System Preferences still wanted to update. Reboot didn't help. I wrote all of this in the question details. Please read it if you haven't.
    – jonvyltra
    Commented Oct 6, 2021 at 18:56
  • What did you end up doing here, jonvyltra?
    – bmike
    Commented Nov 21 at 14:05

2 Answers 2

0

TLDR; erase install if you can’t ignore this and won’t fiddle with the bom.


I would try to reinstall the tools and hope that a second attempt to remove them normally clears up the bill of materials tracking that’s your issue.

If that doesn’t work, your receipts may be stuck in an unexpected state like others have reported. You’ve already done the uninstallation, but the system to track structured package installs thinks all the files are still installed, prompting the update message since you don’t have the updated tools anymore on the drive.

The process of removing these BOM files is not not normal but still the next logical step for you despite your characterization of it as an “utterly terrible idea”

So I booted into recovery mode, disable SIP, moved all files from that folder that had com.apple.pkg.CLTools in their name, and the update in the App Store went away. Then I booted into recovery again to enable SIP

If you had a second Mac, you could save the dance of disabling and enabling SIP by putting your Mac in target disk mode and using another macOS computer to attempt removal of the BOM files


The only other fix is to erase the OS.

Newer OS (including Big Sur) have a sealed system, so erase all contents is quick. Older OS take more time, but in the end, restore from a backup only your apps and user data onto a clean system that hasn’t gotten the receipts out of sync with the installed developer tools.

5
  • Big Sur (the Mac OS version I'm on) uses Signed System Volume, not SIP. All the files are hashed and integrity-checked during boot. It simply wouldn't boot if a file were found to be tampered with. 'Live' systems simply aren't a thing any more, not to mention I don't have another Mac. Also, disabling SSV to get to Library/Apple/System/Library/Receipts means disabling SSV forever (forums.macrumors.com/threads/…). Bad, bad, bad idea.
    – jonvyltra
    Commented Oct 7, 2021 at 19:15
  • Another link to help you get acquaintanced with SSV: eclecticlight.co/2020/06/25/…
    – jonvyltra
    Commented Oct 7, 2021 at 19:15
  • These reasons are also why I'm posting this as a separate question. Big Sur is markedly different from the solutions presented for the other Mac OS versions.
    – jonvyltra
    Commented Oct 7, 2021 at 19:16
  • "You'll need to keep SSV disabled (via csrutil authenticated-root disable) forever if your root volume has been modified." – forums.macrumors.com/threads/…
    – jonvyltra
    Commented Oct 7, 2021 at 19:20
  • Potentially, I’m not able to reproduce despite trying - so if your system is thusly broken, I would consider the erase option more than leaving SSV disabled.
    – bmike
    Commented Oct 7, 2021 at 19:45
-2

remove /Library/Developer/CommandLineTools directory

Apple Technical Note TN2339

0

You must log in to answer this question.

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