When trying to remove all references to a custom attribute we are no longer using,
removed all references to the attribute from the directory schema,
removed all references from the roles and tasks in IDM.
Then exported the directory xml and from the IDM Management Console, modified the XML by removing the entry for the attribute, then imported (Update) the directory XML, and restarted the environment.
Subsequently, when we exporting the directory.xml, the attributes we removed still appear.
How can we remove the attribute from the directory XML?
The directory update/import only adds or modifies objects, it does not perform deletions. This is by design to prevent accidental deletion of required attributes.
The only supported way to delete attributes is to export the environment.zip, delete the environment and directory, then create a fresh directory without those attributes and import the environment.zip.
Deleting and recreating a fresh IME and directory should only be performed in non-production environment or at the direction of support in extremely rare situations where those attributes are causing other problems. This rare situation typically only occurs when the attributes are physically removed from the Directory. When recreating the IME; if you do have to recreate the Environment, review KB 103792 Delete then recreate IME and Directories with the same OID data to recreate the environment with the same OID.
Broadcom Support's recommendation is to leave the unused attributes in place, and change the tasks, screens, and customizations to no longer reference the custom attribute(s).