# Rename and delete channels

> Rename channels, or delete them and their data.

Rename a [channel](https://docs.synnaxlabs.com/reference/channels) to give it a clearer name. Delete a channel to remove it and all of its data.

## Rename channels

[Enterprise](https://docs.synnaxlabs.com/reference/get-started/editions "Needs Synnax Enterprise")

**Console**

Right-click the channel in the channels toolbar and select **Rename**.

[](https://synnax.nyc3.cdn.digitaloceanspaces.com/docs/client/channels/rename-dark.mp4#t=0.001)

**Python**

```python
# One channel
client.channels.rename(tank_pressure.key, "ox_tank_pressure")

# Many channels
client.channels.rename(
    [tank_pressure.key, tank_temperature.key],
    ["ox_tank_pressure", "ox_tank_temperature"],
)
```

**TypeScript**

```typescript
// One channel
await client.channels.rename(tankPressure.key, "ox_tank_pressure");

// Many channels
await client.channels.rename(
  [tankPressure.key, tankTemperature.key],
  ["ox_tank_pressure", "ox_tank_temperature"],
);
```

The new name must follow the [name rules](https://docs.synnaxlabs.com/reference/channels#names). A rename does not change the data of the channel.

### What a rename changes

Plots, schematics, and tasks refer to channels by key. They continue to work after a rename.

Calculated channels and Arc automations refer to channels by name. After a rename, a calculated channel that uses the old name shows an error. Edit its expression to use the new name. A calculated channel keeps its `<name>_time` index when you rename it, and the index keeps its old name.

> In an Arc editor, **Rename symbol** on a channel name renames the channel in Synnax. It does not change other Arc automations or calculated channels.

## Delete channels

> Deleting a channel also deletes all of its data. You cannot undo a delete.

[Enterprise](https://docs.synnaxlabs.com/reference/get-started/editions "Needs Synnax Enterprise")

**Console**

Select one or more channels in the channels toolbar. Right-click the selection, select **Delete**, and confirm.

[](https://synnax.nyc3.cdn.digitaloceanspaces.com/docs/client/channels/delete-dark.mp4#t=0.001)

**Python**

```python
# By key
client.channels.delete(tank_pressure.key)
client.channels.delete([tank_pressure.key, tank_temperature.key])

# By name
client.channels.delete("tank_pressure")
client.channels.delete(["tank_pressure", "tank_temperature"])
```

A [pattern](https://docs.synnaxlabs.com/reference/channels/find#by-pattern) deletes every channel that it matches. `delete("tank_.*")` deletes all channels whose names start with `tank_`. `delete` raises no error when a channel does not exist, so you can call it again.

**TypeScript**

```typescript
// By key
await client.channels.delete(tankPressure.key);
await client.channels.delete([tankPressure.key, tankTemperature.key]);

// By name
await client.channels.delete("tank_pressure");
await client.channels.delete(["tank_pressure", "tank_temperature"]);
```

A [pattern](https://docs.synnaxlabs.com/reference/channels/find#by-pattern) deletes every channel that it matches. `delete("tank_.*")` deletes all channels whose names start with `tank_`. `delete` throws no error when a channel does not exist, so you can call it again.

### Before you delete

* **Index channels** -> Synnax does not delete an index channel while data channels use it. To delete both, delete the data channels first, or delete all of them in one call.
* **Open channels** -> Synnax does not delete a channel while a writer or a reader has it open. Stop the tasks and scripts that use the channel first.
* **References** -> Synnax does not check tasks, Arc automations, or calculated channels before a delete. After the delete, they fail or show an error, so update them first.
* **Calculated channels** -> when you delete a calculated channel, its `<name>_time` index stays. Delete the index too.

To delete the data in a time range and keep the channel, see [delete data](https://docs.synnaxlabs.com/reference/client/delete-data).
