If we just want to prune everything at once without having to enter multiple commands, we can use the following command:
$ docker system prune
The Docker CLI will ask us for a confirmation and then remove all unused containers, images, volumes, and networks in one go and in the right order.
Once again, to avoid Docker asking us for a confirmation, we can just use the force flag with the command.