HowTo: Remove all Docker Images and Containers (disk full)

Docker_(container_engine)_logoIf you’re developing docker containers, after a while you might notice one very big file:

/var/lib/docker/devicemapper/devicemapper/data

The get ride off old unused docker images and containers and refuce the data-file use this two commands:

#!/bin/bash

# Delete all containers
docker rm $(docker ps -a -q)

# Delete all images
docker rmi $(docker images -q)