---
title: "Roll Back Polarity Server v5 Updates – Admin Guide"
slug: "polarity-roll-back-updates"
description: "Learn how to downgrade or revert Polarity Server v5 to a previous version after a failed update. Step-by-step rollback procedures for Docker and Podman deployments to restore system stability."
updated: 2025-12-03T21:06:34Z
published: 2025-12-03T21:06:34Z
---

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

# Roll-Back Polarity Updates

*This process applies to the Polarity Server v5 with containerized PostgreSQL and Redis services.*

There has been some limited success in applying this process in the following cases due to individualized variations in the database components:

- Servers that have been updated from Polarity v4
- Servers that use an external service for PostgreSQL

> [!WARNING]
> In the cases listed above, we recommend contacting Polarity Support for assistance ***PRIOR* to attempting an upgrade**. Feel free to reach out to Support@Polarity.io for support or any questions you may have.

## **Prepare**

This process will apply tags to the desired images so that they are easily referenced.

1. Check the image IDs of the loaded Docker images, and note the image IDs of the Polarity Platform and Web images.
  1. See the [command below](/v1/docs/roll-back-polarity-updates#useful-command-to-check-image-info) to get the information you need.
  2. Example: Polarity Platform v5.4.2 image ID: `eaf0aa9bc33e`
  3. Example: Polarity Web UI v5.4.3 image ID: `926ab167816f`
2. Apply new image tags to the Polarity Platform and Web images to more easily refer to them.
  1. Use the following command:
    1. `docker image tag &lt;image_ID&gt; &lt;image_name&gt;:&lt;image.version&gt;`
  2. Examples:
    1. `docker image tag eaf0aa9bc33e polarity_platform:5.4.2`
    2. `docker image tag 926ab167816f polarity_web:5.4.3`
3. Verify the image tags just added using the command from Step 1.
  1. There may be duplicate entries for the same image(s). This is just an artifact of adding a new tag to an existing image. These point to the same image, and aren’t physically duplicated (ie. they don’t take up extra disk space).

## **Steps to Roll Back**

This process overwrites the image loaded by default with the image desired.

1. Bring down the Polarity Server (if it is running).
  1. `cd /app &amp;&amp; ./down.sh`
2. Open the `/app/docker-compose.yml` file for editing.
3. Find the lines specifying the `image` for the “`app`" and “`web`" containers.
  1. These will be in the `services` block.
4. Comment out the `image` line for each container.
  1. The “pound sign” or “hashtag” is used to denote comments in YAML files.
  2. For example, change from this *(truncated view)*:

```yaml
. . .
    volumes:
      - polarity_platform_local_postgres:/var/lib/postgresql/data:Z
  app:
    image: 577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/polarity_platform:latest
    container_name: polarity_platform
. . .
        max-size: "10M"
        max-file: "6"
  web:
    image: 577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/web:latest
    container_name: polarity_web
. . .
```

…to this:

```yaml
. . . 
    volumes:
      - polarity_platform_local_postgres:/var/lib/postgresql/data:Z
  app:
    # image: 577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/polarity_platform:latest
    container_name: polarity_platform
. . .
        max-size: "10M"
        max-file: "6"
  web:
    # image: 577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/web:latest
    container_name: polarity_web
. . .
```
5. Add in new `image` lines that point to the image tags created for the images we want to roll back to:

```yaml
. . .
    volumes:
      - polarity_platform_local_postgres:/var/lib/postgresql/data:Z
  app:
    # image: 577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/polarity_platform:latest
    image: polarity_platform:5.4.2
    container_name: polarity_platform
. . .
        max-size: "10M"
        max-file: "6"
  web:
    # image: 577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/web:latest
    image: polarity_web:5.4.3
    container_name: polarity_web
. . .
```
6. Save the file and close it.
7. Bring the Polarity Server up.
  1. `cd /app &amp;&amp; ./up.sh`
8. Verify the expected version is running.
  1. `cd /app &amp;&amp; ./health_check.sh`
9. Test the functionality of the Polarity Server.
  1. Log into the Polarity Server.
  2. Install or Update an integration.
    1. Tests the connection to the Polarity Store and the installed certificates.
  3. Conduct a search using an integration that reaches out to a remote data source.
    1. The SANS Internet Storm Center (ISC) integration is a simple, free option.
    2. This tests the full chain interaction from the UI thru the back end, plus the connection out and back to an external data source.

## **Follow-On Notes**

- This process simply changes the image that loads by default to the one specified on the `image` line.
- It does **not**delete any images from the system.
- Future updates will overwrite the `image` line with the line given in the installer.

---

## **Useful Commands**

#### ***Useful command to check image info:***

```bash
for i in $(docker image ls --format="{{.ID}}" | uniq)
do 
  echo "Image ID: $i"
  docker image inspect $i | jq '.[].Config.Labels | "\(.name) v\(.version)"'; docker image inspect $i | jq '.[].RepoTags|.[]'
  echo
done
```

*One-liner version of the above:*

```bash
for i in $(docker image ls --format="{{.ID}}" | uniq); do echo "Image ID: $i"; docker image inspect $i | jq '.[].Config.Labels | "\(.name) v\(.version)"'; docker image inspect $i | jq '.[].RepoTags|.[]'; echo; done
```

*Sample output from the above command:*

```bash
Image ID: 07784203dc39
"Polarity Platform v5.5.2"
"577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/polarity_platform:latest"

Image ID: 829deb91d60f
"Polarity Platform Web UI v5.5.0"
"577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/web:latest"

Image ID: eaf0aa9bc33e
"Polarity Platform v5.4.2"

Image ID: 926ab167816f
"Polarity Platform Web UI v5.4.3"
"577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-web/dev:latest"

Image ID: 43724892d6db
"null vnull"
"redis:latest"

Image ID: 27c7d7de1cc7
"null vnull"
"577326318091.dkr.ecr.us-east-1.amazonaws.com/polarity-aws-prod/postgres-ip4r:latest"
```

### Other Useful Docker Commands

***List all images:***`docker images`

***Change image tags:***`docker image tag &lt;IMAGE_ID&gt; &lt;image_name&gt;:&lt;image.version&gt;`

***Delete a specific image:***`docker image rm &lt;IMAGE_ID&gt;`
