# Reset

Sometimes, all you need is to clean everything and start over.

Our SDK provides the capability to reset your index and/or namespaces.

## Reset Namespace

You can reset a namespace by calling the `reset()` method on the index or namespace.

If the `reset()` method is called on the index, only the default namespace will be reset, not the whole index.

<CodeGroup>
```php simple
use Upstash\Vector\Index;

$index = new Index(
  url: "<UPSTASH_VECTOR_REST_URL>",
  token: "<UPSTASH_VECTOR_REST_TOKEN>",
);

$index->reset();
```

```php using namespaces
use Upstash\Vector\Index;

$index = new Index(
  url: "<UPSTASH_VECTOR_REST_URL>",
  token: "<UPSTASH_VECTOR_REST_TOKEN>",
);

$index->namespace('my-namespace')->reset();
```
</CodeGroup>

## Reset All Namespaces

To reset all namespaces, you can call the `resetAll()` method on the index, as shown below:

```php
use Upstash\Vector\Index;

$index = new Index(
  url: "<UPSTASH_VECTOR_REST_URL>",
  token: "<UPSTASH_VECTOR_REST_TOKEN>",
);

$index->resetAll();
```

You can read more about [Namespaces](/vector/features/namespaces) on our docs.
