Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED DNS Only - How to clear all records

Discussion in 'Bind/DNS/Nameserver' started by tomdchi, Dec 5, 2016.

Tags:
  1. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    133
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    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?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,884
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    133
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Atlanta, GA
    cPanel Access Level:
    DataCenter Provider

    Should the files in /var/named/cache be removed as well?
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,884
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes, you can remove the zone files from the /var/named/cache directory as well.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice