docker delete container and data code example Example 1: remove all containers docker docker rm $(docker ps -aq) Example 2: remove docker images docker system prune -a