Uninstall CAST Imaging on Linux via Docker

Remove a CAST Imaging installation deployed on Linux via Docker

Overview

This guide explains how to remove a CAST Imaging installation that was deployed on Linux via Docker. Choose a complete Docker clean-up (removes all Docker containers, images, and volumes on the machine) or a selective clean-up (removes only CAST Imaging related items).

Complete Docker clean-up

To action a full clean-up:

  • run the following Docker commands
  • delete the installer ZIP file
  • delete the unzipped installation files/folder
  • delete all files/folders in /opt/cast/ (default install path) - this will also delete all analysis data.
# Stop all containers
$ docker stop $(docker ps -a -q)

# Remove all containers
$ docker rm $(docker ps -a -q)

# Remove all images
$ docker rmi $(docker images -a -q)

# Remove all build cache
$ docker builder prune -a

# Remove unused networks
$ docker network prune

# Check remaining data
$ docker system df -v

# Remove data volumes for analyses and the database instance (CAUTION: cannot be reversed)
$ docker volume prune -a

Selective CAST Imaging clean-up

To remove only CAST Imaging related items:

  • run the following Docker commands
  • delete the installer ZIP file
  • delete the unzipped installation files/folder
  • delete all files/folders in /opt/cast/ (default install path) - this will also delete all analysis data.
# Stop imaging-services containers
$ cd /opt/cast/installation/imaging-services
$ docker compose down

# Stop analysis-node container
$ cd /opt/cast/installation/imaging-node
$ docker compose down

# Stop imaging-viewer containers
$ cd /opt/cast/installation/imaging-viewer
$ docker compose down

# Stop dashboards containers
$ cd /opt/cast/installation/imaging-dashboards
$ docker compose down

# Remove images
$ docker images | grep $servicename | awk '{print $3}' | xargs -I {} docker rmi -f {}
$ docker image prune