---
title: removeAllServices()
framework: corebluetooth
role: symbol
role_heading: Instance Method
path: corebluetooth/cbperipheralmanager/removeallservices()
---

# removeAllServices()

Removes all published services from the local GATT database.

## Declaration

```swift
func removeAllServices()
```

## Discussion

Discussion Use this when you want to remove all services you’ve previously published, for example, if your app has a toggle button to expose GATT services. Because apps on the local peripheral device share the GATT database, this method removes only the services that you added using the add(_:) method. This call doesn’t remove any services published by other apps on the local peripheral device.

## See Also

### Adding and Removing Services

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