> For the complete documentation index, see [llms.txt](https://docs.hyper-space.io/hyperspace-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyper-space.io/hyperspace-docs/api-documentation/hyperspace-client/clear_collection.md).

# clear\_collection

The function `clear_collection(collection_name)`clears the data from a Collection. Once a Collection is cleared, the data it contained is lost.

**Input-**

* <mark style="color:purple;">collection\_name</mark> – Specifies the Collection in which to clear the data.

**Example-**

{% tabs %}
{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
hyperspaceClient.clear_collection(collectionName);
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
hyperspaceClient.clearCollection(collection_name);
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```python
await hyperspaceClient.clearCollection(collection_name);
```

{% endcode %}
{% endtab %}
{% endtabs %}
