Docker Sandboxes + OpenCode environment when disk space runs out

Docker Sandboxes can quickly run out of space even with 20GB allocated.

Check available disk space

df -h

4.0K    /boot
4.0K    /media
8.0K    /.rock
5.7M    /etc
75M     /var
435M    /opt
3.6G    /usr
4.1G    /home
4.2G    /tmp
13G     /

Clear npm cache


Check which directories are large

sudo du -xhd1 / 2>/dev/null | sort -h

If /tmp is large, check further inside:

sudo du -xhd1 /tmp 2>/dev/null | sort -h

Note that files starting with a dot (.) are hidden files and won’t appear with ls without the -a option.

© 2025 Hiroe Tech Notes. All rights reserved.

Comments

No comments yet.