> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove Data from Datasets

<Note>While it's possible to delete data from a Dataset, entire Datasets can't be deleted using the SDK. Use the Encord platform to delete Dataset. </Note>

Use the [dataset.delete\_data()](/sdk-documentation/sdk-references/dataset#delete-data) method to delete from Datasets.

In the script below, replace \<video1\_data\_hash> and \<image\_group1\_data\_hash> with the hashes for the  data units you want to remove from a Dataset. If the   data unit being removed is saved on Encord-hosted storage, the file will be deleted.

```python theme={"dark"}
# Import dependencies
from encord import EncordUserClient

# Authenticate with Encord using the path to your private key. Replace \<private_key_path> with the path to your private key
user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path="<private_key_path>"
    )

# Specify the Dataset you want to remove files from. Replace \<dataset_hash> with the hash of your Dataset
dataset = user_client.get_dataset(
    "<dataset_hash>"
    )

# Specify the files to be deleted. Include all the data hashes below
dataset.delete_data(
    [
        "<video1_data_hash\>",
        "<image_group1_data_hash>",
    ]
)
```
