Deleting virtual machines

DELETE /servers/{server_id}

Delete a server with the specified ID.

By default, the instance is going to be hard-deleted immediately from the system, but you can set reclaim_instance_interval > 0 to make the API soft-delete the instance, so that the instance will not be deleted until the reclaim_instance_interval has expired since the instance was soft-deleted. The instance marked as SOFT_DELETED can be recovered via restore action before it is really deleted from the system.


  • The server must exist.
  • Anyone can delete a server when the status of the server is not locked and when the policy allows.
  • If the server is locked, you must have administrator privileges to delete the server.

Asynchronous postconditions:

  • With correct permissions, you can see the server status as deleting.
  • The ports attached to the server, which Nova created during the server create process or when attaching interfaces later, are deleted.
  • The server does not appear in the list servers response.
  • If hard delete, the server managed by OpenStack Compute is deleted on the compute node.


  • If server status remains to be deleting or another error, the request failed. Ensure that you meet the preconditions. Then, investigate the compute back end.
  • The request returns the HTTP 409 response code when the server is locked even if you have correct permissions. Ensure that you meet the preconditions then investigate the server status.
  • The server managed by OpenStack Compute is not deleted from the compute node.




Name In Type Description
server_id path string The UUID of the server.


# curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \


Status codes


Code Reason
204 - No Content The server has fulfilled the request.


Code Reason
401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

409 - Conflict

This operation conflicted with another operation on this resource.