Answers for "docker delete everything"

5

remove docker volume

docker-compose down
docker rm -f $(docker ps -a -q)
docker volume rm $(docker volume ls -q)
docker-compose up -d
Posted by: Guest on July-14-2020
16

docker remove all containers

docker rm $(docker ps -a -q)
Posted by: Guest on February-24-2020
0

delete all containers created x hours ago

# Delete all stopped containers
docker container prune
Posted by: Guest on July-02-2020
1

docker delete container and image

# remove containers created between now upto 4hrs back
docker container prune --filter "until=4h"

# remove images created between now upto 4hrs back
docker image prune --filter "until=4h"
Posted by: Guest on July-22-2020

Code answers related to "docker delete everything"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language