-
-
Save jfreyberg/092cfc1296f9bfd91248436131f55f57 to your computer and use it in GitHub Desktop.
Remove all from Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # sudo version! | |
| # Stop all containers | |
| sudo docker stop `sudo docker ps -qa` | |
| # Remove all containers | |
| sudo docker rm `sudo docker ps -qa` | |
| # Remove all images | |
| sudo docker rmi -f `sudo docker images -qa ` | |
| # Remove all volumes | |
| sudo docker volume rm $(sudo docker volume ls -qf) | |
| # Remove all networks | |
| sudo docker network rm `sudo docker network ls -q` | |
| # Your installation should now be all fresh and clean. | |
| # The following commands should not output any items: | |
| # docker ps -a | |
| # docker images -a | |
| # docker volume ls | |
| # The following command show only show the default networks: | |
| # docker network ls | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment