Updated on 2024-04-18 GMT+08:00

Deleting a Security Group

Scenarios

If your security group is no longer required, you can delete it.

Notes and Constraints

  • The default security group is named default and cannot be deleted.
  • 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. 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

  1. Log in to the management console.
  2. Click in the upper left corner and choose Network > Virtual Private Cloud.

    The Virtual Private Cloud page is displayed.

  3. In the navigation pane on the left, choose Access Control > Security Groups.

    The security group list is displayed.

  4. Locate the row that contains the target security group, click More in the Operation column, and click Delete.

    A confirmation dialog box is displayed.

  5. Confirm the information and click Yes.