How to clean up Docker

前端 未结 5 779
旧巷少年郎
旧巷少年郎 2021-01-31 08:19

I\'ve just noticed that I ran out of disk space on my laptop. Quite a lot is used by Docker as found by mate-disk-usage-analyzer:

The docker/

5条回答
  •  不思量自难忘°
    2021-01-31 08:33

    The following is a radical solution. IT DELETES ALL YOUR DOCKER STUFF. INCLUDING VOLUMES.

    $ sudo su
    # service docker stop
    # cd /var/lib/docker
    # rm -rf *
    # service docker start
    

    See https://github.com/moby/moby/issues/22207#issuecomment-295754078 for details

    It might not be /var/lib/docker

    The docker location might be different in your case. You can use a disk usage analyzer (such as mate-disk-usage-analyzer) to find the folders which need most space.

    See Where are Docker images stored on the host machine?

提交回复
热议问题