You can create your customize command to do this task. I have attached one command for your reference. It will help you to delete all the images in one go.
$ docker rmi -f $(docker images -q)
You can also create the same command to remove your docker containers.
$ docker rm -f $(docker ps -q)
I hope this will help you.