Results 1 to 4 of 4

Thread: Need to delete all 'DNS Only' Zones

  1. #1
    Registered Member
    Join Date
    Oct 2008
    Posts
    36

    Default Need to delete all 'DNS Only' Zones

    Hi
    I need to remove all know DNS Zones on my 'DNS Only' server as they have become out of sync with a new cPanel server.
    Any ideas how I can remove/purge all zones?

    Thanks
    Rob

  2. #2
    Registered Member
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    1,052

    Default

    Try the following on the command prompt:

    for i in `ls -la /var/named/*.db | sed s'/\.db//g' | awk '{print $9}' | cut -d/ -f4`do /scripts/killdns $i done;

  3. #3
    Registered Member
    Join Date
    Oct 2008
    Posts
    36

    Red face

    Thanks, I tried that but end up with a '>' prompt and nothing happens.
    I have to press 'ctrl + c' to return to and normal 'root@ns2 [~]#' prompt.
    Am I doing something wrong?

  4. #4
    Registered Member
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    1,052

    Default

    Ok, do one thing, execute each line as I gave you and hit enter

    for i in `ls -la /var/named/*.db | sed s'/\.db//g' | awk '{print $9}' | cut -d/ -f4`
    do
    /scripts/killdns $i;
    done;
    You will see a '>' sign once you type the first 'for..' line and hit enter, but continue to execute the commands as given above.

Similar Threads

  1. DNSMadeEasy - Do I have to delete DNS zones on WHM?
    By sOliver in forum Bind / DNS / Nameserver Issues
    Replies: 2
    Last Post: 09-09-2011, 06:10 PM
  2. DNS Cluster, howto delete residual DNS zones
    By sohmi in forum Bind / DNS / Nameserver Issues
    Replies: 0
    Last Post: 09-02-2011, 06:51 AM
  3. WHM Edit/Delete DNS Zones has nothing listed
    By Babylon in forum Bind / DNS / Nameserver Issues
    Replies: 6
    Last Post: 12-28-2006, 12:00 PM
  4. delete all dns zones
    By Zion Ahead in forum Bind / DNS / Nameserver Issues
    Replies: 4
    Last Post: 12-22-2006, 04:47 PM
  5. Can't delete DNS zones
    By thestick in forum Bind / DNS / Nameserver Issues
    Replies: 1
    Last Post: 07-03-2006, 08:42 AM
bargain