Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I clean /var/lib/docker/tmp?

Tags:

docker

coreos

My server is CoreOS. There are so many files in /var/lib/docker/tmp, their name's like "GetV2ImageBlob998303926".

The size of all GetV2ImageBlobxxxxxxxx files is 640MB.

Can I remove all files in /var/lib/docker/tmp?

like image 457
Damon Chen Avatar asked Jul 18 '15 09:07

Damon Chen


People also ask

How do I clean up docker storage?

A stopped container's writable layers still take up disk space. To clean this up, you can use the docker container prune command. By default, you are prompted to continue. To bypass the prompt, use the -f or --force flag.

Can I delete docker overlay2 folder?

Whenever we need to completely refresh docker to a clean state, then it is recommended to delete the entire directory, not just sub-directories like overlay2.

How do you clean unused docker images?

If we do not want to find dangling images and remove them one by one, we can use the docker image prune command. This command removes all dangling images. If we also want to remove unused images, we can use the -a flag. The command will return the list of image IDs that were removed and the space that was freed.


1 Answers

This is reported in issues/14506, and addressed in PR 14389, now PR 15414.

Ensure images downloaded by pullTagV2 are always cleaned up

Previously, if only some of the downloads succeed, we would not close and delete the file handles. This does change the behavior of the registration to block on all downloads completing (whereas previously it would exit early after the first failure), which is necessary to ensure cleanup is only performed after the download portion has completed.

That will be fixed in Docker 1.8 or 1.9

like image 168
VonC Avatar answered Oct 14 '22 07:10

VonC