After some time you collect quite a huge pile of data in docker. Every image and layer is still stored on your harddrive and you might need to clean up to free some disk space.
To delete all stopped containers you can use this command
docker rm $(docker ps -a -q)
To delete all untagged/dangling (none) images use
docker rmi $(docker images -q -f dangling=true)
To delete all images use
docker rmi $(docker images -q)
The command might complain that some images can not be deleted. These are the images that are used by running containers.