---
title: "removeServiceGroup(_:completionHandler:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmhome/removeservicegroup(_:completionhandler:)"
---

# removeServiceGroup(_:completionHandler:)

Removes a service group from the home.

## Declaration

```swift
func removeServiceGroup(_ group: HMServiceGroup, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func removeServiceGroup(_ group: HMServiceGroup) async throws
```

## Parameters

- `group`: The service group to remove.
- `completion`: The block executed after the request is processed.

## See Also

### Grouping services

- [servicesWithTypes(_:)](homekit/hmhome/serviceswithtypes(_:).md)
- [serviceGroups](homekit/hmhome/servicegroups.md)
- [addServiceGroup(withName:completionHandler:)](homekit/hmhome/addservicegroup(withname:completionhandler:).md)
- [HMServiceGroup](homekit/hmservicegroup.md)
