Unable to remove a secondary domain

Problem

Not able to remove a secondary domain, message says there are aliases still added in the organization.

Environment

Secondary domain that needs to be removed, at one point was the primary domain of the organization. 

Solution

  1. In your Google Admin console.
  2. Go to Menu Account > Domains > Manage domains.
  3. Disable the test domain alias, as it shows enabled for a secondary domain.
  4. Allow a few minutes of propagation.
  5. Remove the secondary domain again.

Cause

The test domain alias was still enabled for the secondary domain, as it was the primary before.