Skip to main content

Clear Dhcp Lease

POST 

/vyos/dhcp/leases/clear

Clear (release) a single active DHCP lease.

This is an operational command, not a configuration change, so it is issued via the VyOS GraphQL API rather than the batch/config endpoint. The mutation differs between VyOS versions:

  • 1.4: ClearReleaseLeaseDhcp(data: {key, ip_address}) (only active leases can be released)
  • 1.5: ClearDhcpServerLeaseDhcp(data: {key, family, address, vrf})

Args: request: The IP address of the lease to clear, plus optional VRF (1.5).

Returns: Success status and any error reported by VyOS.

Request

Responses

Successful Response