# postgres (/docs/cli/postgres)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Create and manage Prisma Postgres databases.

Location: CLI > postgres

Use `postgres` commands to manage [Prisma Postgres](https://www.prisma.io/docs/postgres) databases in a project. Most commands let you target a specific project with `--project <id-or-name>` and a branch with `--branch <git-name>`.

## Usage [#usage]

  

#### bun

```bash
bunx prisma@latest postgres list
bunx prisma@latest postgres create mydb
```

#### pnpm

```bash
pnpm dlx prisma@latest postgres list
pnpm dlx prisma@latest postgres create mydb
```

#### yarn

```bash
yarn dlx prisma@latest postgres list
yarn dlx prisma@latest postgres create mydb
```

#### npm

```bash
npx prisma@latest postgres list
npx prisma@latest postgres create mydb
```

## Commands [#commands]

| Command                                      | Description                                                                                         |
| -------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `postgres list`                              | List databases                                                                                      |
| `postgres show <database>`                   | Show database metadata without secret values                                                        |
| `postgres create <name>`                     | Create a database and print its one-time connection URL. `--region` sets the Prisma Postgres region |
| `postgres usage <database>`                  | Show usage metrics for a database                                                                   |
| `postgres delete <database>`                 | Permanently delete a database, after exact id confirmation                                          |
| `postgres backup list <database>`            | List platform-created backups for a database                                                        |
| `postgres backup restore <database>`         | Restore from a backup, after exact id confirmation                                                  |
| `postgres connection list <database>`        | List a database's connections                                                                       |
| `postgres connection create <database>`      | Create a database connection and print its one-time connection URL                                  |
| `postgres connection rotate <connection-id>` | Rotate connection credentials and print the new one-time connection URL                             |
| `postgres connection delete <connection-id>` | Permanently delete a database connection, after exact id confirmation                               |

## Related pages

- [`auth`](https://www.prisma.io/docs/cli/auth): Sign in to your Prisma account from the CLI, sign out, and manage workspace sessions.
- [`branch`](https://www.prisma.io/docs/cli/branch): List platform branches for a project.
- [`bucket`](https://www.prisma.io/docs/cli/bucket): Create and manage object-store buckets.
- [`Configuration`](https://www.prisma.io/docs/cli/configuration): Configure Prisma 8 CLI commands with prisma.config.ts and global flags.
- [`contract emit`](https://www.prisma.io/docs/cli/contract-emit): Emit Prisma 8 contract artifacts.