Warning: This will destroy all your images and containers. It will not be possible to restore them!
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
- Download script file below
- Run
chmod +x - Then Run
bash rm.sh - Or
./rm.sh
Warning: This will destroy all your images and containers. It will not be possible to restore them!
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
chmod +xbash rm.sh./rm.sh| #!/bin/bash | |
| # Delete all containers | |
| ```docker rm $(docker ps -a -q)``` | |
| # Delete all images | |
| ```docker rmi $(docker images -q)``` |