Can't remove Command Line Tools

Hmm. I would next try sudo pkgutil --forget com.apple.pkg.CLTools_Executables

This is turning out to be quite a project.

This what I got:

I am running a MBP 2019, 16 inch (Intel) with OS 26.4, but otherwise I have essentially the same problem as the OP.

Software Update displays an update alert for Command Line Tools for Xcode.

Xcode is not in my Applications folder, and I would like to get rid of the alert.

I did recently install and uninstall (completely I thought) Homebrew, Espanso and possibly Xcode and Github Desktop. (Don’t remember all the details.)

I have gone through the previous messages in this thread but am unclear as to whether any of the proposed solutions worked?

I tried the last one offered by @josehill and rebooted, but the alert is still there, and I would be grateful for any help.

David

A couple of weeks ago I upgraded from 15.7.3 to 15.7.4 and a few days ago I checked for updates and noticed changes. The Command Line Tools update is NOT now being offered - hurray! And 15.7.5 update is being offered. Haven’t updated again yet but it looks promising!

Thanks for your reply. Of the many things you tried, which one worked?

The only time I saw that the Command Line Tools update was not being offered was after that update from 15.7.3 to 15.7.4 I wonder if it installed an update for them along with 15.7.4 ? Not sure how to test this.

Type a command that requires the command-line tools and see what happens. For instance, if I run this command to get the C compiler version:

$ gcc -v

Apple clang version 17.0.0 (clang-1700.6.4.2)
Target: arm64-apple-darwin24.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I’m getting a response, because I have the tools installed. If you don’t have them, then you’ll either get an error or you’ll see a popup window asking you to install them.

1 Like

Hi @Shamino, I am not the OP but have a similar problem in macOS 26.4.

I have uninstalled both Command Line Tools and Xcode, but still get the alert in Software Update to install Command Line Tools for Xcode 26.4.

In the attached EasyFind screenshots, are there any files I should still remove?

This seems to be reported by many people - that the software updater continues to present this even after removal.

According to this discussion it appears that the issue is because the installation receipts are still on your computer. Software Update sees them and therefore offers new versions to you.

The solution that people there are claiming works is to delete all files in various “Receipts” directories with names of the form com.apple.pkg.CLTools_....

People in that thread have found them (or have suggested looking for them) in these locations (I assume different releases of macOS store the receipts in different places):

  • /var/db/receipts
  • /Library/Receipts
  • /System/Library/Receipts
  • /Library/Apple/System/Library/Receipts

On my Mac (running macOS 15), I found them in the last of these (/Library/Apple/System/Library/Receipts):

$ ls /Library/Apple/System/Library/Receipts/*CLT*
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_Executables.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_Executables.plist
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS110.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS110.plist
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS12.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS12.plist
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS13.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS13.plist
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS14.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS14.plist
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS_LMOS.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS_LMOS.plist
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS_NMOS.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS_NMOS.plist
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SwiftBackDeploy.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_SwiftBackDeploy.plist
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_macOS_SDK.bom
/Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_macOS_SDK.plist

Note that these files/directories may be protected by SIP. So it might be necessary to temporarily disable SIP in order to delete the receipts.

2 Likes

This is what I got - looks like Command Line Tools is finally gone:

2 Likes

I explored all those locations and only the one shown above had those receipts.
macOS 15.7.5; M2 Studio.

At one time I also had Xcode but found the the Command Line Tools satisfied my minor needs.

Thanks for the tips, @Shamino. I found the receipts in the same place you did.

After reading the discussion at the above link I am hesitant to disable SIP though, not least because the posts are all previous to macOS 26.

Maybe I am being too cautious?

If something goes wrong, would reinstalling the OS fix it?

[Edit:] I tried deleting the receipts, and they do seem to be protected by SIP.