Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Astrohunter

macrumors 6502
Original poster
Sep 16, 2021
358
212
Hi,

I don't need command line tools, but it keeps showing update (7GB).
I don't even have Xcode installed, I've tried deleting "Developer" folder.

How do I get rid of this notification?

Thanks
 

Attachments

  • Screenshot 2024-08-24 at 21.57.25.png
    Screenshot 2024-08-24 at 21.57.25.png
    30.9 KB · Views: 125
Click on "Update Now" button.

Command Line Tools are not just part of Xcode. They are required by other things - e.g. Homebrew. To completely remove them may need a clean install
I don't have Homebrew installed anymore though.
 
Thanks, it seems like you have to disable SIP to remove them all.
A little bit silly.

Maybe this Terminal command might work without disabling SIP:

sudo rm -rf /Library/Developer/CommandLineTools

Or did you already delete that complete Developer folder?
 
Maybe this Terminal command might work without disabling SIP:

sudo rm -rf /Library/Developer/CommandLineTools

Or did you already delete that complete Developer folder?
Yeah already deleted it, I will try disabling SIP tomorrow and try to delete the rest of the junk left on my drive.

Cheers 👍🏻
 
  • Like
Reactions: Adora
I got that update too, but I recently installed homebrew. Seems I am to supid to get it running from the path the Terminal normally starts in. What I had to type in Terminal directly after installation didn't work and editing two files that didn't exist, as another solution, also didn't work. I created too files with that name in the folder I thought they could belong. But it didn't change anything.

Don't know if anything changed in macOS 15, but in 14 I got it to work somehow for at least the time I closed the Terminal app again.

A few years ago it just worked after installation and nothing needs to be done.

Seems everything is getting more complicated every year. I disabled SIP, set the Security settings where I had to boot into too to the lowest level and also disabled Gatekeeper. Now many apps I need just work again without several confirmations or strange xattr-commands.
 
  • Sad
Reactions: Astrohunter
I am also interested in removing the Command line tools. Has anyone performed this process successfully? what are the current steps to do it right?
 
I am also interested in removing the Command line tools. Has anyone performed this process successfully? what are the current steps to do it right?

There is a Folder /Library/Developer/CommandLineTools. It's about 5GB. I would just delete it at first. Maybe that's already enough.

The solution seems to change every few years.

Somewhere someone wrote you should do that Terminal command after deleting the folder:

pkgutil --forget (and then the location/name of the package for it, what I don't know)
 
I am also interested in removing the Command line tools. Has anyone performed this process successfully? what are the current steps to do it right?

Screen Shot 2024-11-11 at 17.01.19.png


Also go to this fle. You can open it simply with DiskEdit.

Deleted this part and save the file. Might look different to you. It just has to include the String for the Command Line Tools.

Code:
<dict>
        <key>date</key>
        <date>2024-06-20T02:31:11Z</date>
        <key>displayName</key>
        <string>Command Line Tools</string>
        <key>displayVersion</key>
        <string></string>
        <key>packageIdentifiers</key>
        <array>
            <string>com.apple.pkg.CLTools_Executables</string>
            <string>com.apple.pkg.CLTools_SDK_macOS14</string>
            <string>com.apple.pkg.CLTools_SDK_macOS13</string>
            <string>com.apple.pkg.CLTools_macOS_SDK</string>
            <string>com.apple.pkg.CLTools_SwiftBackDeploy</string>
        </array>
        <key>processName</key>
        <string>Installer</string>
    </dict>
 
Nothing seems to work still.

Are you sure you removed all the "pkgs"? Though CommandlineTools is one pkg file, it installs many Mac OS X packages (I think it is what they call an mpkg). On one old installation of Xcode 12.4, my system has all these:
com.apple.pkg.CLTools_Executables
com.apple.pkg.CLTools_SDK_macOS1015
com.apple.pkg.CLTools_SDK_macOS110
com.apple.pkg.CLTools_macOS_SDK
com.apple.pkg.DevSDK
com.apple.pkg.DevSDK_OSX1010
com.apple.pkg.DevSDK_OSX1011
com.apple.pkg.DevSDK_OSX1012
com.apple.pkg.DevSDK_OSX109
com.apple.pkg.DevSDK_macOS1013_Public
com.apple.pkg.XcodeSystemResources
com.apple.pkg.macOS_SDK_headers_for_macOS_10.14

Ideally there would be a group or something that would let you uninstall as a bundle but unfortunately that doesn't seem to be the case.

If all files for CommandlineTools were installed under /Library/Developer then "pkgutil --file-info /Library/Developer" would list all packages that went under that subfolder but that heuristic doesn't work for pkgs like "com.apple.pkg.macOS_SDK_headers_for_macOS_10.14" only seem to exist to create dummy files in private/tmp/...

In the end I had to manually review the output of "pkgutil --pkgs" to make that list.

You may also have to run "xcode-select --reset" after all this. Never tried to remove Xcode tools so never tried running that...

Unfortunately MacOS X's package management is a bit of a mess. The pieces appear to be there but it's unfinished relative to what I've seen in other systems even decades ago. Ideally in my mind there would be an algebra such that installing A + B + C - C would give you the exact same system as installing A + B (okay not an real algebra in that A + B + B should not give you A + 2B...).
 
  • Like
Reactions: Astrohunter
I ended up booting to recovery, and using terminal to remove all of the receipts files.
I did follow this guide:


Although the location of the receipts files was different, and I didn't sadly write it down.

Time will tell if Mac update system will still bully me with CLT updates.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.