Forked from ngpestelos/remove-docker-containers.md
Last active
November 1, 2019 16:51
-
-
Save adamatti/0a2c8e4c72cc4d3059462b173b6a1331 to your computer and use it in GitHub Desktop.
Revisions
-
adamatti revised this gist
Nov 1, 2019 . No changes.There are no files selected for viewing
-
ngpestelos revised this gist
May 26, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ 1. Delete all containers $ docker ps -q -a | xargs docker rm -q prints only the container IDs -a prints all containers @@ -9,6 +9,6 @@ Notice that it uses xargs to issue a remove container command for each container 2. Delete all untagged images $ docker rmi $(docker images | grep “^<none>” | awk ‘{print $3}’) awk must use a single quote (this filters all image IDs) -
ngpestelos revised this gist
May 26, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ 1. Delete all containers $ docker ps -q -a | xargs docker rm -q prints only the container IDs -a prints all containers @@ -9,6 +9,6 @@ Notice that it uses xargs to issue a remove container command for each container 2. Delete all untagged images $ docker rmi $(docker images | grep “^<none>” | awk ‘{print $3}’) awk must use a single quote (this filters all image IDs) -
ngpestelos created this gist
May 26, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ 1. Delete all containers docker ps -q -a | xargs docker rm -q prints only the container IDs -a prints all containers Notice that it uses xargs to issue a remove container command for each container ID 2. Delete all untagged images docker rmi $(docker images | grep “^<none>” | awk ‘{print $3}’) awk must use a single quote (this filters all image IDs)