Skip to content

Instantly share code, notes, and snippets.

@lucassmacedo
Last active December 15, 2021 12:28
Show Gist options
  • Save lucassmacedo/7e393dded5d6e38a126f928885b82a20 to your computer and use it in GitHub Desktop.
Save lucassmacedo/7e393dded5d6e38a126f928885b82a20 to your computer and use it in GitHub Desktop.
Delete Exited Containers on Docker
# 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