Deleting an Instance

If your instance degrades or you no longer need it, you can delete it.

  1. List all instances and note the instance Name or ID. It is best to use the server ID in case two servers have the same name.

    $ openstack server list
    +-------------+----------------------+--------+------------------+
    | ID          | Name                 | Status | Networks         |
    +-------------+----------------------+--------+------------------+
    | 84c6e57d... | myCirrosServer       | ACTIVE | private=10.0.0.3 |
    | 8a99547e... | myInstanceFromVolume | ACTIVE | private=10.0.0.4 |
    | d7efd3e4... | newServer            | ERROR  |                  |
    +-------------+----------------------+--------+------------------+
    
  2. Delete the instance by referencing the instance Name or ID. In this example, the newServer instance reports an ERROR status and the following command deletes the instance.

    $ openstack server delete newServer
    
  3. There is no response signifying the instance was deleted successfully. To verify, list the servers again to see that the instance no longer appears in the list. If you receive an error in response, then check if you have the correct name or ID of the server.

    $ openstack server list
    +-------------+----------------------+--------+------------------+
    | ID          | Name                 | Status | Networks         |
    +-------------+----------------------+--------+------------------+
    | 84c6e57d... | myCirrosServer       | ACTIVE | private=10.0.0.3 |
    | 8a99547e... | myInstanceFromVolume | ACTIVE | private=10.0.0.4 |
    +-------------+----------------------+--------+------------------+