To remove all Docker containers, you can use the command below which will delete all stopped containers:
docker container prune [docker remove all stopped containers]
If however you would like to remove all docker images (dangling and unreferenced), volumes, unused containers, run the command below:
docker system prune [docker remove all images]
The solution above is valid for Docker 1.13.x and above.
Read: How to create new users in a Docker container?
Answer due to Ken Cochrane
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.