Use the remove() function instead of delete().
Please see sample asl script below which will iterate through the UnitaryComputerSystem Superclass and perform a remove() on each instance found.
To run this script, use the sm_adapter command:
./sm_adapter -s <DomainName> <FullPathToScript>
START() {
.. eol
}
do {
foreach Obj (getInstances("UnitaryComputerSystem")) { // Gets all the UCS instances in the topology
UCSObj = object(Obj);
print(UCSObj->Name);
UCSObj->remove();
}
print("Done dumping all the UCS Instances");
}