def delete(table, chain=None, position=None, rule=None, family='ipv4'):

    if position and rule:
        return 'Error: Only specify a position or a rule, not both'

    if not check_table(table, family=family):
        return 'Error: table {0} in family {1} does not exist'.\
                format(table, family)

    if not check_chain(table, chain, family=family):
        return 'Error: chain {0} in table {1} in family {2} does not exist'.\
                format(chain, table, family)

    if not check(table, chain, rule, family=family):
        return 'Error: rule {0} chain {1} in table {2} in family {3} does not exist'.\
                format(rule, chain, table, family)

    # nftables rules can only be deleted using the handle
    # if we don't have it, find it.
    if not position:
        position = get_rule_handle(table, chain, rule, family)

    nft_family = _NFTABLES_FAMILIES[family]
    cmd = '{0} delete rule {1} {2} {3} handle {4}'.\
            format(_nftables_cmd(), nft_family, table, chain, position)
    out = __salt__['cmd.run'](cmd, python_shell=False)

    if len(out) == 0:
        return True
    else:
        return False
Delete a rule from the specified table & chain, specifying either the rule
dataset/ETHPy150Open saltstack/salt/salt/modules/nftables.py/delete