How to remove old Exploratory Server Docker images to free up disk space.

If you have upgraded your Exploratory Server in the past, you may have old, unused Docker images in your system. It explains how to remove those old Exploratory Server Docker images from the system to free up disk space.

1. Check the current Exploratory Server version that you are using.

Run the following commands to check the docker-compose.yml file to find out the current Exploratory Server version that you are running.

cd exploratory
cat docker-compose.yml|grep "image: exploratory"

The sample output is the following. In this example, the current version is "7.0.9".

$ cd exploratory
$ cat docker-compose.yml|grep "image: exploratory"
  image: exploratory:7.0.9

2. Remove unnecessary Docker images from the system.

List of Docker images currently stored in the system.

Run the following commands to see the list of Docker images currently stored in the system.

docker images

Depending on the system configuration, you may need "sudo" at the beginning of the command.

sudo docker images

The sample output is the following.

$ docker images
REPOSITORY      TAG             IMAGE ID       CREATED         SIZE
exploratory     7.0.9           38612a8f1f4d   18 hours ago    1.77GB
scheduler       7.0.9           cef0ed61922e   47 hours ago    2.46GB
<none>          <none>          01dac6906098   47 hours ago    1.77GB
r-exploratory   7.0.9           93d103c877e8   7 days ago      5.84GB
mongo           4.2.24          519509e84e8d   10 days ago     388MB
exploratory     6.12.3.6        c1f28ee49912   2 months ago    1.77GB
scheduler       6.12.3.6        1d365e2d0a62   2 months ago    2.46GB
r-exploratory   6.12.3.6        9732eec6c1ec   3 months ago    7.07GB
nginx           1.21.4-alpine   b46db85084b8   18 months ago   23.2MB
mongo           3.4.22          ab4287b7a939   3 years ago     428MB

Remove old, unused Exploratory Server Docker images.

You can remove the exploratory, r-exploratory, and scheduler images with the older versions. In this example, the current version is "7.0.9" so you shouldn't remove the images with the "7.0.9" tag. You can safely remove the following images.

REPOSITORY      TAG             IMAGE ID       CREATED         SIZE
exploratory     6.12.3.6        c1f28ee49912   2 months ago    1.77GB
scheduler       6.12.3.6        1d365e2d0a62   2 months ago    2.46GB
r-exploratory   6.12.3.6        9732eec6c1ec   3 months ago    7.07GB

You can run the following command the remove the Docker images. You can get the IMAGE IDs from the output of the previous command.

docker images <IMAGE ID> <IMAGE ID> ...

For example, you can run the following command to remove those 3 images.

$ docker images c1f28ee49912 1d365e2d0a62 9732eec6c1ec

Verify the removal.

You can run the docker images command again to verify the removal.

$ docker images
REPOSITORY      TAG             IMAGE ID       CREATED         SIZE
exploratory     7.0.9           38612a8f1f4d   18 hours ago    1.77GB
scheduler       7.0.9           cef0ed61922e   47 hours ago    2.46GB
<none>          <none>          01dac6906098   47 hours ago    1.77GB
r-exploratory   7.0.9           93d103c877e8   7 days ago      5.84GB
mongo           4.2.24          519509e84e8d   10 days ago     388MB
nginx           1.21.4-alpine   b46db85084b8   18 months ago   23.2MB
mongo           3.4.22          ab4287b7a939   3 years ago     428MB
Export Chart Image
Output Format
PNG SVG
Background
Set background transparent
Size
Width (Pixel)
Height (Pixel)
Pixel Ratio