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.
![](https://i0.wp.com/images.pexels.com/photos/1639557/pexels-photo-1639557.jpeg?w=1200&ssl=1)
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
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/07/cropped-light_logo-5.png?resize=100%2C100&ssl=1)