# Revision history [back]

### Remove availability zone / aggregate

We have 4 compute nodes and an availability zone spanning all 4 nodes.
During testing / desaster recovery I created availability zones with only one node in them: node1, node2, ...
I don't want them to be used in production. I only needed them for temporary being able to decide on which node my instance is spawned. But now their are used randomly ("use any availability zone") when spawning new instances.

Is there any way to get rid of a host-aggregate (that provides an availability zone)?

aggregate-delete doesn't work:

nova aggregate-delete 5
ERROR: Cannot perform action 'delete' on aggregate 5. Reason: not empty code here


It doesn't work either after deleting the instances having the corresponding availability zone. I think that's because the instance metadata stays in the database and is only marked as "deleted".

Additionally: Is there a way to migrate/move an instance to another availability zone or change the availability zone, if the hypervisor host is in the old and new availability zone?