Today we’re going to learn how to delete the Docker image when performing a Docker Compose down to then regenerate an update without generating garbage.

The command we should use to stop the container and delete the associated image is:
docker-compose down --rmi all
This will remove the associated images of that Docker Compose.
To regenerate them:
docker compose up -d --build
