Clean up metadata

It has happened to all administrators to find themselves with an isolated domain controller.
In this case, after performing a dcpromo /forceremoval, all AD and DNS databases should be cleaned. For this purpose Microsoft gives the procedure that has been carried out.
For Windows Server 2003 :
http://technet.microsoft.com/en-us/library/cc736378(v=ws.10).aspx
For Windows Server 2008 R2 :
http://technet.microsoft.com/en-us/library/cc816907(v=ws.10).aspx