Delete a specific key value using the defaults delete command line tool

Having the following .plist file:


/usr/bin/sudo /usr/bin/defaults read /Library/Preferences/com.apple.systempreferences.plist


{
    DisabledPreferencePanes =     (
        "com.apple.preference.general",
        "com.apple.preference.mouse"
    );
}


Using the defaults command line tool, if I want to delete for example only the com.apple.preference.mouse line from the plist how do I do that?

Posted on Sep 9, 2020 9:20 AM

Reply
2 replies

Sep 9, 2020 10:51 AM in response to fabio168

fabio168 wrote:

Having the following .plist file:

/usr/bin/sudo /usr/bin/defaults read /Library/Preferences/com.apple.systempreferences.plist

{
DisabledPreferencePanes = (
"com.apple.preference.general",
"com.apple.preference.mouse"
);
}

Using the defaults command line tool,

if I want to delete for example only the com.apple.preference.mouse line from the plist how do I do that?



Maybe you can say more here, what is it you trying to accomplish in the long run?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Delete a specific key value using the defaults delete command line tool

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.