SOLVED DNS Only - How to clear all records

tomdchi

Well-Known Member
Feb 24, 2008
142
4
68
Atlanta, GA
cPanel Access Level
DataCenter Provider
I have a new DNS Only installation and something is not working right and I would like to remove all zone records and re-sync from another DNS server. Is there a procedure for doing this? The DNS Only admin does not have the option to remove zone files. Would I just remove all zones from /var/named?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

You can backup the zones, remove them from the /var/named directory, and then rebuild the /etc/named.conf file via the following commands:

Code:
cp -a /var/named /var/backup-named
rm /var/named/*.db
/scripts/rebuilddnsconfig
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Should the files in /var/named/cache be removed as well?
Yes, you can remove the zone files from the /var/named/cache directory as well.

Thank you.