openstack Verified current stable Not installed? Networking

Openstack / Delete Servers

Delete Servers

Delete specified servers in OpenStack.

$
Terminal
openstack server delete <instance_id1 instance_id2 ...>

When To Use

When decommissioning multiple compute resources to optimize costs and management.

Pro Tip

Consider using `--wait` to ensure all specified servers are removed properly before proceeding with other commands.

Warning

Destructive operation. Confirm the target path and keep a backup before executing.

Anatomy of Output

Understanding the result

Deleting servers: 2 Action Summary

Total number of servers targeted for deletion.

+--------------------------------------+---------+----------+ Output Header

Displays IDs and statuses of servers being deleted.

| ID | Name | Status | Column Details

Show server details post-deletion.

| 890123cd-abcd-ef00-8888-99990000ff00 | deleted-server | DELETED | Deleted Entry

Indicates successful deletion of the server.

Power User Variants

Optimized versions

openstack server delete --all

Delete all servers in the current context.

Troubleshooting

Common pitfalls

Server not found (HTTP 404)

Solution: Check that the provided IDs or names are valid.

Unauthorized (HTTP 401)

Solution: Ensure your user role has permissions to delete the servers.

Conflict (HTTP 409)

Solution: Server may already be deleted or in an immutable state.

Command Breakdown

What each part is doing

openstack
Base Command
The executable that performs this operation. Here it runs Openstack before the shell applies any redirect operators.
<instance_id1 instance_id2 ...>
instance id1 instance id2 ...
The value supplied for instance id1 instance id2 ....

Alternative Approaches

Comparable commands in other tools

Alternative networking tools for the same job.