Docker remove all image, volume, container

Right here I’m going to jot down about eradicating docker photos, volumes and containers. To take action, to start with, it is advisable shutdown the docker container.

docker-compose down
Enter fullscreen mode

Exit fullscreen mode

After that, you may comply with following methodology to take away required issues,

# To take away all of the containers
docker rm -f $(docker ps -a -q)

# To take away all of the docker photos
docker rmi -f $(docker photos -a -q)

# To take away all of the volumes
docker quantity rm $(docker quantity ls -q)

# To delete all the pieces
docker system prune -a --volumes
Enter fullscreen mode

Exit fullscreen mode

Add a Comment

Your email address will not be published. Required fields are marked *