How to delete a dyanmic DNS record using Python or Bash?
Question: The Following code in python updates

    
    
    import dns.query
    import dns.tsigkeyring
    import dns.update
    import sys
     keyring = dns.tsigkeyring.from_text({'host-example.' : 'XXXXXXXXXXXXXXXXXXXXXX=='})
    
    update = dns.update.Update('dyn.test.example', keyring=keyring)
    update.replace('host', 300, 'a', sys.argv[1])
    
     response = dns.query.tcp(update, '10.0.0.1')
    

but I could not find out how to remove a dns entry.


Answer: The [`delete()`](http://www.dnspython.org/docs/1.14.0/dns.update.Update-
class.html#delete) method of `dns.update.Update` can be used to delete a
record.

    
    
    import dns.query
    import dns.tsigkeyring
    import dns.update
    
    keyring = dns.tsigkeyring.from_text({'host-example.' : 'XXXXXXXXXXXXXXXXXXXXXX=='})
    update = dns.update.Update('dyn.test.example', keyring=keyring)
    update.delete('host', 'A')
    response = dns.query.tcp(update, '10.0.0.1')
    

