# Befehle

Löscht alle gestoppten Container  
Windows -&gt; docker container prune

Linux

One liner to stop / remove all of [Docker](http://www.docker.io/) containers:

<div data-lang="prettyprint prettyprinted" id="bkmrk-docker-stop-%24%28docker"><div data-lang="prettyprint prettyprinted"><textarea style="display: none;">docker stop $(docker ps -a -q) docker rm $(docker ps -a -q)</textarea><div><div><textarea readonly="readonly" spellcheck="false" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div><div></div></div><div><div></div></div><div></div><div></div><div><div><div><div><div><div><div><div>2</div></div></div><div></div><div></div><div><div> </div></div><div><div><div><div>1</div></div>```
<span role="presentation" style="padding-right: 0.1px;">docker stop $(docker ps -a -q)</span>
```

</div><div><div><div>2</div></div>```
<span role="presentation" style="padding-right: 0.1px;">docker rm $(docker ps -a -q)</span>
```

</div></div></div></div></div></div><div></div><div></div></div></div></div></div>docker save -o &lt;path for generated tar file&gt; &lt;image name&gt;  
Then copy your image to a new system with regular file transfer tools such as cp, scp or rsync(preferred for big files). After that you will have to load the image into Docker:

docker load -i &lt;path to image tar file&gt;  
PS: You may need to sudo all commands.

<div data-lang="prettyprint prettyprinted" id="bkmrk-"><div><div><div></div></div></div></div>