Skip to content

Instantly share code, notes, and snippets.

@kazu69
Last active May 29, 2022 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazu69/9742759 to your computer and use it in GitHub Desktop.
Save kazu69/9742759 to your computer and use it in GitHub Desktop.
docker container stop, remove and remove images on line
# stop all container
# -a=false: Show all containers. Only running containers are shown by default.
# -q=false: Only display numeric IDs
sudo docker stop $(docker ps -a -q)
# remove all container
sudo docker rm $(docker ps -a -q)
# remove all images
# -a=false: show all images
# -q=false: only show numeric IDs
sudo docker rmi $(sudo docker images -a -q)
@eziz
Copy link

eziz commented May 29, 2022

1

Hello friend, How are you? I put picture please check it. thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment