> This page location: APIs & SDKs > CLI > Projects and branches > databases
> Full Neon documentation index: https://neon.com/docs/llms.txt

> Summary: The Neon CLI `databases` command lists, creates, and deletes Postgres databases within a Neon project branch directly from the terminal. Use `neon databases create --name <db> --owner-name <role>` to provision a database on a named branch, or omit `--branch` to target the project's default branch. Each subcommand accepts `--project-id` (required only for accounts with multiple projects) and `--context-file` for reusable context.

# Neon CLI command: databases

List, create, and delete databases in a Neon project

The `databases` command lists, creates, and deletes databases in a Neon project from the terminal. For information about databases in Neon, see [Manage databases](https://neon.com/docs/manage/databases). If `--project-id` is omitted, the CLI resolves it from your [context file](https://neon.com/docs/cli/link), auto-selects when your account has only one project, and otherwise asks you to pass `--project-id`.

Subcommands: [create](https://neon.com/docs/cli/databases#create), [delete](https://neon.com/docs/cli/databases#delete), [list](https://neon.com/docs/cli/databases#list)

## neon databases list

Lists databases. If you don't specify a branch ID or name with `--branch`, the command targets the project's default branch. This applies to all `databases` subcommands.

```bash
neon databases list [options]
```

| Option         | Description       | Type   | Default | Required |
| -------------- | ----------------- | ------ | ------- | :------: |
| `--branch`     | Branch ID or name | string | —       |    No    |
| `--project-id` | Project ID        | string | —       |    No    |

```bash
neon databases list
```

```text filename="Output"
Databases on main
Name    Owner Name    Created At
neondb  neondb_owner  2026-06-19T18:27:19Z
```

The table is titled with the branch the databases belong to. Pass `--branch <id-or-name>` to list another branch's databases.

## neon databases create

Creates a database. If you don't specify `--owner-name`, the current user becomes the database owner.

```bash
neon databases create [options]
```

| Option         | Description       | Type   | Default | Required |
| -------------- | ----------------- | ------ | ------- | :------: |
| `--name`       | Database name     | string | —       |    Yes   |
| `--owner-name` | Owner name        | string | —       |    No    |
| `--branch`     | Branch ID or name | string | —       |    No    |
| `--project-id` | Project ID        | string | —       |    No    |

```bash
neon databases create --name mynewdb --owner-name alex
```

```text filename="Output"
Database created on main
Name        mynewdb
Owner Name  alex
Created At  2026-06-19T23:45:45Z
```

## neon databases delete

Deletes a database. The `<database>` is the database name.

```bash
neon databases delete <database> [options]
```

| Option         | Description       | Type   | Default | Required |
| -------------- | ----------------- | ------ | ------- | :------: |
| `--branch`     | Branch ID or name | string | —       |    No    |
| `--project-id` | Project ID        | string | —       |    No    |

```bash
neon databases delete mydb
```

```text filename="Output"
Database deleted from main
Name        mydb
Owner Name  neondb_owner
Created At  2026-06-19T23:45:45Z
```

---

## Related docs (Projects and branches)

- [snapshots](https://neon.com/docs/cli/snapshots)
- [diff](https://neon.com/docs/cli/diff)
- [projects](https://neon.com/docs/cli/projects)
- [branches](https://neon.com/docs/cli/branches)
- [roles](https://neon.com/docs/cli/roles)
- [operations](https://neon.com/docs/cli/operations)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/docs/cli/databases"}` to https://feedback.neon.tech/ (no auth required).
