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

# List and manage templates

> List and delete your templates with the E2B SDKs

You can list your project's templates and delete the ones you no longer need with the JavaScript and Python SDKs.

## List templates

`Template.list` returns a paginator over your project's templates, newest first. Pass `limit` to set the page size (`1` to `100`, defaults to `100`) and `nextToken` to resume from a previous page.

```typescript JavaScript & TypeScript theme={"theme":"css-variables"}
import { Template } from 'e2b'

const paginator = Template.list()
while (paginator.hasNext) {
  const templates = await paginator.nextItems()
  for (const t of templates) {
    console.log(t.templateId, t.names, t.buildStatus)
  }
}
```

```python Python theme={"theme":"css-variables"}
from e2b import Template

paginator = Template.list()
while paginator.has_next:
    for t in paginator.next_items():
        print(t.template_id, t.names, t.build_status)
```

In async Python, use `AsyncTemplate.list()` and `await paginator.next_items()`.

Each template includes `templateId`, `names`, `buildId`, `buildStatus`, `cpuCount`, `memoryMB`, `diskSizeMB`, `envdVersion`, `public`, `createdAt`, `updatedAt`, `lastSpawnedAt`, `spawnCount`, and `buildCount` (snake\_case in Python, e.g. `template_id`, `memory_mb`).

## Delete a template

`Template.delete()` deletes a template or snapshot by ID or name. It returns `true` if the template was deleted and `false` if it wasn't found.

```typescript JavaScript & TypeScript theme={"theme":"css-variables"}
import { Template } from 'e2b'

const deleted = await Template.delete('my-template')
```

```python Python theme={"theme":"css-variables"}
from e2b import Template

deleted = Template.delete("my-template")
```

```python Python (async) theme={"theme":"css-variables"}
from e2b import AsyncTemplate

deleted = await AsyncTemplate.delete("my-template")
```
