Unable to delete a security group
Written by
Updated at December 17, 2025
Issue description
When trying to delete a security group, you get this error:
code = FailedPrecondition desc = Security group with id *** not empty
Solution
Before deleting a security group, disassociate it from the VM. To do this, follow these steps:
- In the management console, go to Compute Cloud.
- Select the target VM.
- In the VM settings, scroll down to network.
- Click
and select Edit from the drop-down list. - Disassociate the security group.
- Click Save changes.