I've removed everything that can be removed, however this still appears:

pkgutil --packages | grep CLTools

Mac OS X version is 11.5.2.

  • 2
    What problem are you actually trying to fix? Sep 9, 2021 at 15:01
  • @MarcWilson Uninstall Xcode and Command Line Tools.
    – Smeterlink
    Sep 9, 2021 at 17:55
  • I haven't tested this, but sudo pkgutil --forget com.apple.pkg.CLTools_Executables etc might remove them. Oct 10, 2021 at 3:36
  • 1
    Good answer here: superuser.com/a/525395/161451 Nov 28, 2022 at 21:38

2 Answers 2


The command

pkgutil --packages | grep CLTools

lists in human-readable form the content of Receipt and BOM files left on your Mac by the installer after successful installation. In these files, Mac Installer writes what has been installed and where.

These files don't get updated when you manually remove installed files, and so the command will not be aware of your removals.

If you are sure you removed "everything that was installed", you can use another command:

pkgutil --forget <package id>

to remove the actual Receipt and BOM files. After that - another call will not show you those packages.

However - I would recommend that you first look for, and into those Receipt files - to make sure you actually removed all that was installed.

The Receipt and BOM files can be found in several places, depending on Who installed and in what scope. I have found them in these places, but this is by no means a comprehensive list.


I don't know how to parse these plist files, but I know a Receipt is an XML formatted .plist do its content should not be too hard to read. BOM files may be harder to read directly, but you can still use pkgutil --files to print our their contents. There is also a 3rd-party application called "Suspicious Package" that provides this via very nice and usable UI. I'm not sure whether these solutions go to the actual installed files or just the receipt and BOM files for information.

Hope this helps.


I just reinstalled the whole operating system and make a backup of / after that to preserve as desired.

You must log in to answer this question.

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