Last active
December 15, 2021 12:28
-
-
Save lucassmacedo/7e393dded5d6e38a126f928885b82a20 to your computer and use it in GitHub Desktop.
Delete Exited Containers on Docker
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
# docker ps -a = Get all containers | |
# grep Exited = Filter the Exited Containers | |
# awk awk '{print $1}' = Filter the first column (ID) | |
docker rm $(docker ps -a | grep Exited | awk '{print $1}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment