title: How to clean up Docker
body: <p>I've just noticed that I ran out of disk space on my laptop. Quite a lot is used by Docker as found by <code>mate-disk-usage-analyzer</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/gBt99.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gBt99.png" alt="Enter image description here"></a></p>
  
  <p>The <code>docker/aufs/diff</code> folder contains 152 folders ending in <code>-removing</code>.</p>
  
  <p>I already ran the following commands to clean up</p>
  
  <pre><code>Kill all running containers:
  # docker kill $(docker ps -q)
  
  Delete all stopped containers
  # docker rm $(docker ps -a -q)
  
  Delete all images
  # docker rmi $(docker images -q)
  
  Remove unused data
  # docker system prune
  
  And some more
  # docker system prune -af
  </code></pre>
  
  <p>But the screenshot was taken <em>after</em> I executed those commands.</p>
  
  <p><strong>What is <code>docker/aufs/diff</code>, why does it consume that much space and how do I clean it up?</strong></p>
  
  <p>I have Docker version 17.06.1-ce, build 874a737. It happened after a cleanup, so this is definitely still a problem.</p>