Deleting a Security Group
Scenarios
If your security group is no longer required, you can delete it.

Both default and custom security groups are free.
Constraints
- The default security group is named default and cannot be deleted.
Figure 1 Default security group
- Before deleting the last VPC in a region, you need to delete all custom security groups in the region. Only custom security groups must be deleted. The default security group does not impact VPC deletion.
Figure 2 Deleting a VPC
- If you want to delete a security group that is associated with instances, such as cloud servers, containers, and databases, you need to remove the instances from the security group first and delete the security group. For details, see Adding an Instance to or Removing an Instance from a Security Group.
- A security group cannot be deleted if it is used as the source or destination of a rule in another security group.
Delete or modify the rule and delete the security group again.
For example, if the source of a rule in security group sg-B is set to sg-A, you need to delete or modify the rule in sg-B before deleting sg-A.
Procedure
- Go to the security group list page.
- Locate the row that contains the target security group, click More in the Operation column, and click Delete.
A confirmation dialog box is displayed.
- Confirm the information and click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot