docker remove container and volume code example
Example 1: 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 2: remove stopped containers
$ docker rm $(docker ps -a -q)
Example 3: delete container id
docker rm $(docker ps -a -q)
Example 4: remove container and volume docker
docker rm -v container_name
Example 5: how to remove a docker container
docker container rm [container id]