Skip to main content

Delete Network Port

Delete (remove) a network port by its ID. Any fixed IP addresses associated with the port are released back to their subnet allocation pools.

Default policy settings allow you to delete only ports that belong to your project (unless you have administrative privileges). Some system or service ports (e.g. DHCP, router interfaces) may be protected by policy.

Request

DELETE /v2.0/ports/{port_id}

Path Parameters

NameInTypeDescription
port_idpathstringID of the port to delete.

Example Request

curl -ks -X DELETE -H 'Content-Type: application/json' \
-H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:9696/v2.0/ports/2d74fa0c-3e43-4fd9-a234-cbb4996cc684

Response

If successful, the server returns no body content.

Status Codes

Success

CodeReason
204 - No ContentThe port was deleted successfully.

Error

CodeReason
401 - UnauthorizedUser must authenticate before making a request.
403 - ForbiddenPolicy does not allow current user to perform this operation.
404 - Not FoundThe specified port could not be found.
412 - Precondition FailedA request precondition (header) was not met.

Notes & Considerations

  • Deleting a port that is currently attached to a device (e.g. an instance or router) may fail with a conflict depending on deployment policy. Detach the device first if necessary.
  • After deletion, any released IP addresses become immediately available for reallocation within their subnets.
  • Attempting to delete service-owned ports (DHCP, router interfaces, SNAT) typically requires administrative privileges.

See Also