Created
August 8, 2016 11:49
-
-
Save marek-pietrzak-tg/e5890e7736d14197643b2a641b6c4db7 to your computer and use it in GitHub Desktop.
Docker containers "clean up"
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
| #!/bin/sh | |
| # You can "clean-up" your containers by. | |
| # 1. Removing the exisiting, non-running, containers (will delete their data too if they are not running): | |
| docker rm $(docker ps -qa) | |
| # 2. Removing the existing, unused, images: | |
| docker rmi $(docker images -q) | |
| # and docker volumes: | |
| docker volume rm $(docker volume ls -q) |
marek-pietrzak-tg
commented
Jul 2, 2018
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment