We want to delete and add new data to change all groups, AIDs, and CAPKs currently set up on your device. It appears that there is no command to remove all groups, AIDs of the instrument.
for CAPK only full erase exists via Delete All CA Public Keys (D0-05) command.
There is no delete ALL groups command or delete all AIDs command. All AIDs that associate with Group 0x00, 0x04, 0x08, and whatever you see from the default, are considered System AIDs. System AIDs and the respective groups can not be deleted. You can only disable it.
Here is an example of how to disable system AID - a0000002771010 (Interac, group 0x18). And you can do the same to other AIDs and Groups.
send command 04-04, data 9f0607a0000002771010 // For a system AID, the command will set the disable bit in FFE6.(= 0x80)
16:01:30.070 OUT: 5669564f7465636832000404000a9f0607a00000027710101535
16:01:30.071 IN: 5669564f74656368320004000000ae16
send command 04-03, data ffe4011800 // to clear TVLs in group 0x18.
16:02:49.670 OUT: 5669564f74656368320004030005ffe4011800d8fb
16:02:49.673 IN: 5669564f74656368320004000000ae16