Stop all Docker container
docker stop $(docker ps -aq)
Remove all Docker container
docker rm $(docker ps -aq)
Remove all dangling Docker images
docker rmi $(docker images -qf dangling=true)
Clean all dangling Docker volumes
docker volume rm $(docker volume ls -qf dangling=true)
See also "docker system prune" and "docker system prune --volumes". These commands do a similar cleanup.
https://docs.docker.com/config/pruning/