UMIHICO BLOG.

300GBあった「システムデータ」を削除した話

#Docker#Mac

「このMacについて」→「ストレージ(タブ)」→「管理」から空き容量を作ることができますが、システムデータという編集が不可能な項目で300GB近く専有しており、削除までに調査が必要だった話

正体は~/Library/Containers/com.docker.docker

ググると貴重な情報が得られた

The "System" category appears to be including sandboxed application data, which is stored in ~/Library/Containers/. I used About This Mac | Storage | Review Files | File Browser to navigate to the folders/files using the most space and found that Docker was growing a file called Docker.qcow2 indefinitely in ~/Library/Containers/. Deleting the file released 30GB from "System" while "Documents" stayed the same size.

duコマンドで掘り進めていくと~/Library/Containers/com.docker.dockerが200GB近くとっていた

docker system pruneで半分解決

いつもdocker system pruneして数GB単位で減っていたので、dockerを疑ってなかったので驚いた

ドキュメントを見てみると、なんとvolumeはデフォルトでは削除されない模様。ずっと勘違いしていた

volumeも含めるオプションをつけて78GBの削除に成功、、いや残りの約120GBは?

docker system prune --all --force --volumes

Docker.rawという1つのファイルに全部残ってた

~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw

なぜかResourcesのAdvancedタブが消えていて(Proxyしかない)、サイズをいじれなかった。

Clean/Purge Dataを実行して、一旦十分な容量を確保できたのでここで打ち切る

References

Edit this aricle on GitHub