I installed docker on a Debian 7 machine in the following way
$ echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
$
The current best practice is
docker system prune
This will remove:
- all stopped containers
- all volumes not used by at least one container
- all networks not used by at least one container
- all dangling images
This is permanent.
Make sure you read this answer, re: Volumes
You may also be interested in this answer, if docker system prune does not work for you.