remove all docker data code example
Example 1: remove all docker images
docker ps -aq
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
Example 2: remove docker volume
docker-compose down
docker rm -f $(docker ps -a -q)
docker volume rm $(docker volume ls -q)
docker-compose up -d
Example 3: windows delete all docker images
$ docker system prune --all
Example 4: docker remove all volume
docker volume rm $(docker volume ls -q)
Example 5: delete container id
docker rm $(docker ps -a -q)
Example 6: remove container and volume docker
docker rm -v container_name