Skip to content

defaults delete domain is not working

  • by


Find the *.plist that corresponds to the defaults settings for the domain.

### user settings search
find ~/Library -name "com.mycompany.AppName.plist" -print
find $XCODE_DERIVED_DATA -name "com.mycompany.AppName.plist" -print

### system search... likely a broader search than needed
sudo find / -name "com.mycompany.AppName.plist" -print

Removes all default information for domain:

defaults delete com.mycompany.AppName

The defaults delete com.mycompany.AppName commands clears the contents of the XML .plist associated with the domain.

Completely remove the domain from defaults:

### cautiously delete file manually or with `rm`
rm /PATH/TO/com.mycompany.AppName.plist

Note: If the “com.mycompany.AppName” application or service is running, then do not be surprised when defaults read com.mycompany.AppName has regenerated the *.plist and still returns values. Also, a “com.mycompany.AppName” executable relaunch can itself recreate the preference defaults *.plist again.

Leave a Reply

Your email address will not be published. Required fields are marked *