[Yandex Cloud documentation](../../../index.md) > [Yandex Compute Cloud](../../index.md) > [Step-by-step guides](../index.md) > Placement groups > Removing an instance group from a placement group

# Removing an instance group from a placement group

{% list tabs group=instructions %}

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the CLI command for updating a group:

      ```bash
      yc compute instance-group update --help
      ```

  1. Get a list of instance groups in the default folder:

      ```bash
      yc compute instance-group list
      ```

      Result:

      ```text
      yc compute instance-group list
      +----------------------+-----------------------+------+
      |          ID          |         NAME          | SIZE |
      +----------------------+-----------------------+------+
      | amc65sbgfqeq******** | first-instance-group  |    2 |
      +----------------------+-----------------------+------+
      ```

  1. Select `ID` of the instance group in question.
  1. Delete the `placement_policy` section from the YAML file you used to create the group, e.g., `specification.yaml`. If this YAML file is missing, [get info](../instance-groups/get-info.md) on the instance group and create a new file. For more information, see [Creating a fixed-size instance group](../instance-groups/create-fixed-group.md).
  1. Update the instance group in the default folder:

      ```bash
      yc compute instance-group update --id <instance_group_ID> --file specification.yaml
      ```

  Instance Groups will initiate removing the instance group from the placement group.

- API {#api}

  You can remove an instance group from a placement group by using the [update](../../instancegroup/api-ref/InstanceGroup/update.md) REST API method for the [InstanceGroup](../../instancegroup/api-ref/InstanceGroup/index.md) resource or the [InstanceGroupService/Update](../../instancegroup/api-ref/grpc/InstanceGroup/update.md) gRPC API call.

  To request a list of available instance groups, use the [listInstances](../../instancegroup/api-ref/InstanceGroup/listInstances.md) REST API method or the [InstanceGroupService/ListInstances](../../instancegroup/api-ref/grpc/InstanceGroup/listInstances.md) gRPC API call.

{% endlist %}