Skip to content

Instantly share code, notes, and snippets.

@hsaputra
Created March 19, 2019 16:00
Show Gist options
  • Save hsaputra/6c5641aca130d3bf4d73e3e63197c9b5 to your computer and use it in GitHub Desktop.
Save hsaputra/6c5641aca130d3bf4d73e3e63197c9b5 to your computer and use it in GitHub Desktop.
Docker - remove all containers based on container id
# for each container ID use the docker "rm" command to remove/delete the container
!for cid in $(docker ps -a | awk '{print $1}' | tail -n +2);do docker rm $cid; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment