I am seeing a bunch of directories with the same files in my /tmp directory. I'm wondering if what is generating those directories as there was cases when it generated to many that it filled up my disk space.

Running ls -l /tmp shows the following:

enter image description here

Then the directory contents which shows the same files being repeated:

enter image description here

  • pyinstaller. Take a peek at github.com/projectcalico/calicoctl/issues/1178 "calicoctl leaks /tmp/_MEI* directories on start" ?
    – steve
    Oct 24, 2019 at 17:57
  • @steve would it still be the case if I don't have Calico installed? I am only running Docker and Docker Compose. Oct 24, 2019 at 22:17
  • @RaphaelMarco yes. The first response in that github issue says that the /tmp/_MEI* files are created by pyinstaller, not by calico itself (and, given that pyinstaller just bundles up python code and libraries and other stuff into one self-contained installer, it's not surprising to see it create temporary directories containing files and directories like that). Are you installing anything in your dockerfile or docker compose script that uses pyinstaller?
    – cas
    Oct 25, 2019 at 3:17
  • 2
    btw, Please don't post images of text. Copy and paste the text itself into your question and format it as code by selecting it and pressing Ctrl-K or by using the editor's {} icon.
    – cas
    Oct 25, 2019 at 3:20
  • Same issue here, I use docker and docker-compose tool on the server.
    – Toilal
    Mar 24, 2020 at 9:00

2 Answers 2


I'm running a cron involving docker-compose each hour, and timestamps from those directories match. So docker-compose seems to be involved.

I was running docker-compose v1.24, and just upgraded to v1.25.4, wait and see ...


This issue comes from the docker-compose build command which generates these temporary build folders. You can safely delete them.

Following this GitHub issue, you can change the destination of these temporary build folders with the TMPDIR environment variable: export TMPDIR=/new_temp_build_docker_dir

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .