---
title: "removeService(_:completionHandler:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmservicegroup/removeservice(_:completionhandler:)"
---

# removeService(_:completionHandler:)

Removes a service from the service group.

## Declaration

```swift
func removeService(_ service: HMService, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func removeService(_ service: HMService) async throws
```

## Parameters

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

## See Also

### Managing Service Groups

- [name](homekit/hmservicegroup/name.md)
- [uniqueIdentifier](homekit/hmservicegroup/uniqueidentifier.md)
- [updateName(_:completionHandler:)](homekit/hmservicegroup/updatename(_:completionhandler:).md)
- [services](homekit/hmservicegroup/services.md)
- [addService(_:completionHandler:)](homekit/hmservicegroup/addservice(_:completionhandler:).md)
