---
title: "remove(_:)"
framework: corebluetooth
role: symbol
role_heading: Instance Method
path: "corebluetooth/cbperipheralmanager/remove(_:)"
---

# remove(_:)

Removes a specified published service from the local GATT database.

## Declaration

```swift
func remove(_ service: CBMutableService)
```

## Parameters

- `service`: The service you want to remove.

## Discussion

Discussion Because apps on the local peripheral device share the GATT database, more than one instance of a service may exist in the database. As a result, this method removes only the instance of the service that your app added to the database (using the add(_:) method). If any other services contains this service, you must first remove them.

## See Also

### Adding and Removing Services

- [add(_:)](corebluetooth/cbperipheralmanager/add(_:).md)
- [removeAllServices()](corebluetooth/cbperipheralmanager/removeallservices().md)
