PreviousNext

Deleting Attribute Instances

Use the dcecp modify command with the -remove option to delete attribute instances attached to an object. To delete all instances of an attribute from an object, supply the attribute name to the -remove option. For example, the following command deletes all instances of the MVSname attribute from the principal named delores:

dcecp> principal modify delores -remove MVSname
dcecp>

To remove a single instance of a multivalued attribute, supply the attribute name and the attribute value. For example, the following command deletes only the instance value5 from the multivalued attribute named multivalue. All other values and the attribute itself remain intact.

dcecp> principal modify delores -remove {multi-value value5}
dcecp>

However, if you delete the last instance of a multivalued attribute, dcecp will also delete the attribute from the object because an attribute without a value cannot be attached to an object. Note that you cannot combine deleting multivalued attributes and values from multivalued attributes with the same command.

To delete more than one attribute from an object, you must use the -types option. This option tells dcecp that all the values supplied are the names of attribute types, not attribute values. For example, the following sample command uses the -types option to delete the attributes named MVSname and MVSinteger from the principal delores:

dcecp> principal modify delores -remove {MVSname MVSinteger} -types
dcecp>

Without the -types option, dcecp will assume that MVSinteger is the value for the MVSname attribute and, because no such value exists, the command will fail.