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
| Name | In | Type | Description |
|---|---|---|---|
port_id | path | string | ID 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
| Code | Reason |
|---|---|
| 204 - No Content | The port was deleted successfully. |
Error
| Code | Reason |
|---|---|
| 401 - Unauthorized | User must authenticate before making a request. |
| 403 - Forbidden | Policy does not allow current user to perform this operation. |
| 404 - Not Found | The specified port could not be found. |
| 412 - Precondition Failed | A 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.