Last active
August 30, 2022 07:34
-
-
Save pranaysahith/cee6a43968e8d311ae300ff9f4c36f7c to your computer and use it in GitHub Desktop.
delete containers and images
This file contains 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/bash | |
# delete all docker images | |
docker rmi $(docker images -a -q) | |
# delete docker containers | |
docker container prune -f | |
# clean everything | |
docker system prune -f | |
# delete all docker images | |
docker images --format '{{.ID}}' | xargs docker rmi $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment