'how to remove 1 key using plutil?

Data is a file:

<?xmlversion="1.0"encoding="UTF-8"?>
<!DOCTYPEplistPUBLIC"-//Apple//DTDPLIST1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plistversion="1.0">
<dict>
    <key>FairPlayKeyData</key>
    <data>LS0tLS1CRU5FUi0tLS0tCg==</data>
    <key>LDActivationVersion</key>
    <integer>2</integer>
    <key>unbrick</key>
    <true/>
    <key>WildcardTicketToRemove</key>
    <data>MIICqgsdAgMBAAE=</data>
</dict>
</plist>

I want to remove this data:

<key>WildcardTicketToRemove</key>
<data>MIICqgsdAgMBAAE=</data>

i try:

plutil -remove WildcardTicketToRemove file

output:

Property List error: Encountered unknown tag plistversion="1.0" on line 3 / JSON error: JSON text did not start with array or object and option to allow fragments not set.

key


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source