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

# Upgrade Postgres

<Warning>
  **This page is archived.** Fly Postgres (unmanaged) is no longer maintained, and Fly.io Support is not able to provide support or guidance for it. We now offer [Fly.io Managed Postgres](/postgres), our fully-managed database service that handles all aspects of running production PostgreSQL databases.

  These pages are kept for reference and are not listed in the navigation. The full set is indexed on the [Fly Postgres (Unmanaged)](/unmanaged-postgres) page.
</Warning>

You can upgrade a Fly Postgres cluster across minor Postgres app versions with [`fly image update`](/flyctl/cmd/fly_image_update). This updates your Machines to the [latest release](https://github.com/fly-apps/postgres-flex/releases) of the [postgres-flex](https://github.com/fly-apps/postgres-flex) app.

Check your current image with [`fly status`](/flyctl/cmd/fly_status):

```bash theme={null}
fly status -a <postgres-app-name>
```

And upgrade with:

```bash theme={null}
fly image update -a <postgres-app-name>
```

The update only works if the major Postgres version in your existing Postgres app matches that in the newest Postgres app release, for example `postgres-flex:15.2` to `postgres-flex:15.3`.

Upgrading Postgres across major versions is more complicated, and right now the way to do this is to provision a new cluster and restore a backup of your database data into it.

<Note>
  **Important:** If you're running the legacy version of Fly Postgres, then you won't be able to use `fly image update` to upgrade to the new Postgres Flex app. You'll need to create a new Postgres app and import your data using the [`fly postgres import`](/flyctl/cmd/fly_postgres_import) tool.

  To see your Postgres image and version, run `fly image show`. Legacy postgres images use the `flyio/postgres` repository, new Postgres Flex images use the `flyio/postgres-flex` repository.
</Note>
