"sudo docker system prune -af" after docker-compose down code example Example: remove stopped containers $ docker rm $(docker ps -a -q)