Semi public function to delete zone records by ID because I dont have a strong enough selector... you can have 3 A records that are identical other than content...
963402
public function delZoneRecord($zone, $recordid)
    {
        if (!$recordid) {
            throw new \Exception('missing record id');
        }
        // Make sure we know what zone to target
        if (!isset($this->zones[$zone])) {
            throw new \Exception("unknown zone {$zone} did you call getZones()?");
        }
        /*
            <urn2:deleteResourceRecords>
                <urn2:domainName>test.com</urn2:domainName>
                <urn2:resourceRecordId>40523414</urn2:resourceRecordId>
            </urn2:deleteResourceRecords>
        */
        $response = $this->soapCall('deleteResourceRecords', ['domainName' => $zone, 'resourceRecordId' => $recordid]);
        if (!$response['callSuccess']) {
            throw new \Exception('SOAP callSuccess false');
        }

        return $response;
    }
67765
public function deleteZone($layoutId, string $zoneIdentifier, ?int $status = null): void
    {
        $query = $this->connection->createQueryBuilder();
        $query->delete('ngbm_zone')
            ->where(
                $query->expr()->andX(
                    $query->expr()->eq('layout_id', ':layout_id'),
                    $query->expr()->eq('identifier', ':identifier')
                )
            )
            ->setParameter('layout_id', $layoutId, Type::INTEGER)
            ->setParameter('identifier', $zoneIdentifier, Type::STRING);

        if ($status !== null) {
            $this->applyStatusCondition($query, $status);
        }

        $query->execute();
    }
95907
def get_zone(self, zone_id, records=True):
        
        mask = None
        if records:
            mask = 'resourceRecords'
        return self.service.getObject(id=zone_id, mask=mask)
284494
def _delete_record(self, identifier=None, rtype=None, name=None, content=None):
        """"""
        records = self._raw_records(identifier, rtype, name, content)
        LOGGER.debug('delete_records: %s', [rec['id'] for rec in records])
        self._update_records(records, {
            'deleterecord': True,
            'type': rtype,
            'hostname': name,
            'destination': content,
        })
        LOGGER.debug('delete_record: %s', True)
        return True
1137634
def purgeRecords( dbid, query = nil, qid = nil, qname = nil )
      @dbid = dbid
      xmlRequestData = getQueryRequestXML( query, qid, qname )
      sendRequest( :purgeRecords, xmlRequestData )
      @num_records_deleted = getResponseValue( :num_records_deleted )

      return self if @chainAPIcalls
      @num_records_deleted
   end
323995
def _parse_identifier(self, identifier, zone=None):
        
        rdtype, name, content = None, None, None
        if len(identifier) > 7:
            parts = identifier.split('/')
            rdtype, name, content = parts[0], parts[1], '/'.join(parts[2:])
        else:
            records = self._list_records_in_zone(zone)
            for record in records:
                if record['id'] == identifier:
                    rdtype, name, content = record['type'], record['name'] + '.', record['content']
        return rdtype, name, content
376521
protected function canDeleteZone()
    {
        return isset($this->data_zone['zone_id'])
            && $this->zone->canDelete($this->data_zone['zone_id'])
            && $this->access('zone_delete');
    }
1346526
def delete_records_safely_by_xml_id(env, xml_ids):
    
    for xml_id in xml_ids:
        logger.debug('Deleting record for XML-ID %s', xml_id)
        try:
            with env.cr.savepoint():
                env.ref(xml_id).exists().unlink()
        except Exception as e:
            logger.error('Error deleting XML-ID %s: %s', xml_id, repr(e))
174629
def delete_obj_by_id(id)
      if (pos = find_obj_addr_by_id(id))
        delete_obj_by_address(pos, id)
        return true
      end

      return false
    end
834461
public static function removeByID( $id )
    {
        $db = eZDB::instance();
        $db->begin();
        $db->query( "DELETE FROM ezcobj_state_link WHERE contentobject_state_id=$id" );
        eZPersistentObject::removeObject( eZContentObjectStateLanguage::definition(), array( 'contentobject_state_id' => $id ) );
        eZPersistentObject::removeObject( eZContentObjectState::definition(), array( 'id' => $id ) );
        $db->commit();
    }
146909
function removeRecord(options) {
    let query = getQueryParams(options, ['name', 'content', 'type', 'query']);
    return find(options.domain, query).then(function (response) {
      let records = response.data.result;
      if (records.length === 0) {
        throw new Error('No matching records found');
      }
      let results = [];
      _.each(records, function (record) {
        results.push(self.cloudflareClient.removeRecord(record.zone_id, record.id));
      });
      return Promise.all(results);
    }).then(function (responses) {
      let messages = _.map(responses, function (response) {
        return 'Deleted record with id ' + response.data.result.id;
      });

      return new Result(messages);
    });
  }
1123486
public function delete($id = null)
    {
        if ($this->loaded() && !is_null($id) && ($id !== $this->id)) {
            throw $this->exception('Unable to determine which record to delete');
        }
        if (!is_null($id) && (!$this->loaded() || ($this->loaded() && $id !== $this->id))) {
            $this->load($id);
        }
        if (!$this->loaded()) {
            throw $this->exception('Unable to determine which record to delete');
        }
        $id = $this->id;

        $this->hook('beforeDelete', array($id));
        $this->controller->delete($this, $id);
        $this->hook('afterDelete', array($id));

        $this->unload();

        return $this;
    }
145477
def delete_zone(zone, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    if region is None:
        region = 'universal'

    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    _zone = conn.get_zone(zone)

    if _zone:
        conn.delete_hosted_zone(_zone.id)
        return True
    return False
1111613
def delete_records(self, zone_name, record_type, subdomain):
        
        records = self._client.get('/domain/zone/{}/record'.format(zone_name),
                                   fieldType=record_type, subDomain=subdomain)
        for record in records:
            self.delete_record(zone_name, record)
121465
def options_td(record_or_name_or_array, hide_destroy = false)
      items = []
      items << link_to('Edit', edit_polymorphic_path(record_or_name_or_array))
      items << link_to('Delete', polymorphic_path(record_or_name_or_array), :confirm => 'Are you sure?', :method => :delete, :class => "destructive") unless hide_destroy
      list = content_tag(:ul, convert_to_list_items(items))
      content_tag(:td, list, :class => "options")
    end
252597
def delete_records(keep=20):
    """"""
    sql = "SELECT * from records where is_deleted<>1 ORDER BY id desc LIMIT -1 offset {}".format(keep)
    assert isinstance(g.db, sqlite3.Connection)
    c = g.db.cursor()
    c.execute(sql)
    rows = c.fetchall()
    for row in rows:
        name = row[1]
        xmind = join(app.config['UPLOAD_FOLDER'], name)
        xml = join(app.config['UPLOAD_FOLDER'], name[:-5] + 'xml')

        for f in [xmind, xml]:
            if exists(f):
                os.remove(f)

        sql = 'UPDATE records SET is_deleted=1 WHERE id = ?'
        c.execute(sql, (row[0],))
        g.db.commit()
76395
public function delete($id = null)
    {
        if (!is_null($id)) {
            $this->load($id);
        }
        if (!$this->loaded()) {
            throw $this->exception('Unable to determine which record to delete');
        }

        $tmp = $this->dsql;

        $this->initQuery();
        $delete = $this->dsql->where($this->id_field, $this->id);

        $delete->owner->beginTransaction();
        $this->hook('beforeDelete', array($delete));
        $delete->delete();
        $this->hook('afterDelete');
        $delete->owner->commit();

        $this->dsql = $tmp;
        $this->unload();

        return $this;
    }