<?xml version='1.0' encoding='UTF-8'?>
<elementos_gw>
  <documento>
    <id>6555</id>
    <autor>5</autor>
    <nome>Docker: how to clean container temp files</nome>
    <nome_facil>docker how to clean container temp files</nome_facil>
    <criacao>2022-07-17 07:05:59</criacao>
    <alteracao>2022-09-21 11:57:08</alteracao>
    <texto>If your docker disk usage is too large, try this:

1. Find the cointainer which has a large size:
{{{
docker system df -v
}}}

2. Use that container in the command below:
{{{
docker exec &lt;container&gt; /bin/bash -c &#039;rm -rf /tmp/.*&#039;
}}}

That saved me &gt;37GB.

(Also posted on [https://forums.docker.com/t/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay/30604/57?u=sonysantos Docker Forum].)
----
P.S. to exclude {{{.}}} and {{{..}}} and avoid warning messages, you can use:

{{{
docker exec &lt;container&gt; /bin/bash -c &#039;rm -rf tmp/.[!.]* tmp/..?* tmp/*&#039;
}}}
</texto>
    <publico>1</publico>
    <original>0</original>
    <anterior>0</anterior>
    <versao>0</versao>
    <traducao>0</traducao>
  </documento>
</elementos_gw>
