# ClusterManager.remove() method · @imqueue/core

Source: https://imqueue.org/api/core/latest/core.clustermanager.remove/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/core 3.3.2 — generated reference, not hand-written

Unregisters a cluster from this manager.

**Signature:**

```typescript
remove(cluster: string | InitializedCluster, destroy?: boolean): Promise<void>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| cluster | string \| [InitializedCluster](https://imqueue.org/api/core/latest/core.initializedcluster/) | the cluster handle returned by [ClusterManager.init()](https://imqueue.org/api/core/latest/core.clustermanager.init/), or its `id` |
| destroy | boolean | _(Optional)_ when true (the default), destroy the manager once no clusters remain; pass false to unregister without tearing it down |


**Returns:**

Promise<void>

## Remarks

Unregistering the last cluster destroys the manager and releases its transport — for [UDPClusterManager](https://imqueue.org/api/core/latest/core.udpclustermanager/) that means shutting down the shared broadcast worker. Calling this with an unknown id while no clusters remain also triggers that shutdown, which is why `destroy()` implementations must be idempotent.

