Mac – Removing uninstalled Command Line Tools from AppStore updates

command linemac-appstorexcode

I have deleted the Xcode Command Line Tools from my machine by essentially removing the folder. However, AppStore still shows updates from the CLI tools, which obviously I don't want.

I've been trying to properly understand where AppStore looks to figure out what needs updating, but I haven't been able to find a certain answer yet. I tried editing the updatejournal file, but that didn't help, so I've since restored it.

I started to suspect that the fact that pkgutil shows some CLTools-packages might be the cause of this. Forgetting them does not work however as the bom are neither in /var/db/receipts or /Library/Receipts (the pkgutil --forget essentially fails because of this).

I did however find them after a lot of searching in /System/Library/Receipts. Those I can't delete though due to the system security. I can of course bypass that and delete them to see if it works, but I don't want to do that "just to see".

I would like to find a proper solution to this.

Any ideas what I should do here?

Best Answer

I managed to fix it, it seems like I suspected, the problem was the boms in the /System/Library/Receiptsfolder.

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.

It doesn't feel quite right to disable the security, but I gave it a try in this case as other similar problems seemed to be related to lingering bom files, so perhaps it makes sense.