Updated: Aug 9, 2019
Metadata cleanup is a required procedure after a forced removal of Active Directory Domain Services (AD DS).
You perform metadata cleanup on a domain controller in the domain of the domain controller that you forcibly removed.
Metadata cleanup removes data from AD DS that identifies a domain controller to the replication system.
Metadata cleanup also removes File Replication Service (FRS) and Distributed File System (DFS) Replication connections and attempts to transfer or seize any operations master (also known as flexible single master operations or FSMO) roles that the retired domain controller holds. These additional processes are performed automatically.
You can use this procedure to clean up server metadata for a domain controller from which you have forcibly removed AD DS.
If you use the Active Directory Users and Computers console provided with Windows Server 2008, or Windows Server 2008 R2, or the Remote Server Administration Tools (RSAT) for Windows Vista or Windows 7, the metadata is automatically cleaned up when a domain controller account is removed from the Domain Controllers organizational unit (OU).
You can also remove a computer account and metadata using the Active Directory Sites and Services (dsa.msc) console, but you must first remove the NTDS settings object below the domain controller account in order to have the metadata automatically removed.
The standard methods for removing metadata, such as using a script or NTDSUTIL still work.