openstack Verified current stable Not installed? Cloud Infrastructure

Openstack / Delete Network

Delete Network

Deletes a specified network from OpenStack.

$
Terminal
openstack network delete <network_id_or_name>

When To Use

During maintenance activities or when decommissioning services reliant on the network.

Pro Tip

Force deletion with `--force` to remove networks with pending dependencies; however, this may cause service disruption.

Warning

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

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
openstack network delete <network_id_or_name>

Anatomy of Output

Understanding the result

+--------------------------------------+---------------------------------+ Deletion Confirmation

Confirms successful deletion of the network.

| ID | net-old-01 | Deleted Network ID

Unique identifier of the deleted network.

| Status | deleted | Deletion Status

Indicates the network has been successfully removed.

+--------------------------------------+---------------------------------+ End Output

End of deletion confirmation.

Troubleshooting

Common pitfalls

Network not found: net-invalid

Solution: Ensure the provided network ID or name is correct.

You are not authorized to perform this action

Solution: Review user permissions for network management in your OpenStack project.

Failed to delete network: in use

Solution: Disconnect any dependent resources before attempting deletion.

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.
<network_id_or_name>
network id or name
The value supplied for network id or name.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.