Question: The official Docker documentation mentions that I need to run `docker rm -v containername` to specifically remove a data volume. But what do you do if you already removed all the containers referencing the specific data volume ?

Answer: 
Before version 1.9, Docker didn't provide any way to remove dangling volumes.

If such volumes are taking too much disk space and you want to take matters into your own hands though, you can manually delete the volumes by first identifying the ones which are in use. You can run `docker inspect -f '{{ .Volumes }}' containername` to find the location in the file system of the volumes in use, and then delete everything except those. If you have lots of containers, you can run `for x in $(docker ps -qa | sed '1d'); do docker inspect -f '{{ .Volumes }}' ${x}; done` to loop through the containers and list the volumes.

Better yet, you can use the Python script [here](https://github.com/dummymael/dotfiles/blob/1859a36afba2252f86a0a1ff8d5fb442e74b7a0e/tools/docker_clean_vfs.py), the prerequisite is to install the python API client for Docker `pip install docker-py`
Use command 

```
docker volume ls -qf dangling=true | xargs -r docker volume rm

```

to clear dangling volumes from docker 1.9 and above.