---
title: "removeNetwork(with:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrbaseclusterthreadnetworkdirectory/removenetwork(with:completion:)"
---

# removeNetwork(with:completion:)

Command RemoveNetwork

## Declaration

```swift
func removeNetwork(with params: MTRThreadNetworkDirectoryClusterRemoveNetworkParams, completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func removeNetwork(with params: MTRThreadNetworkDirectoryClusterRemoveNetworkParams) async throws
```

## Discussion

Discussion Removes the network with the given Extended PAN ID from the ThreadNetworks attribute.
