You can demote the last domain controller in an Active Directory domain using the DCPromo command-line utility. Once it has been demoted you can safely remove the DNS Role from the server and reboot.
To configure Windows Server 2008 Core to be the first Domain Controller (DC) in a new Active Directory (AD) Domain Services (DS) Forest, you must configure some prerequisites such as Rename the Computer with NetDom, Configure the Network Interface with NetSh, and Install the DNS Server Role with OCSetup.