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

# unpublishL2CAPChannel(_:)

Removes a published service from the local system.

## Declaration

```swift
func unpublishL2CAPChannel(_ PSM: CBL2CAPPSM)
```

## Parameters

- `PSM`: The Protocol and Service Multiplexer (PSM) to remove from the system.

## Discussion

Discussion After you make this call, the peripheral manager accepts no new connections for this PSM, and closes any existing L2CAP channels using this PSM.

## See Also

### Using L2CAP Channels

- [publishL2CAPChannel(withEncryption:)](corebluetooth/cbperipheralmanager/publishl2capchannel(withencryption:).md)
