You can remove management from an expansion enclosure only when no arrays are configured.
Remove the array from the enclosure by using the management GUI or by running the rmarray command. Then, retry the original command.