[Errno 28] No space left on device

I am experiencing a “No space left on device” error in my Firebase Studio workspace, which is preventing me from continuing my development work.

Upon investigation, I’ve determined that the /ephemeral filesystem is at 100% capacity.

The output of df -h confirms this:

Filesystem Size Used Avail Use% Mounted on

/dev/sdb 23G 23G 0 100% /ephemeral

Further analysis with du -sh * within /ephemeral shows that the /ephemeral/nix directory is the primary consumer of space (60GB).

I attempted to resolve this by running nix-collect-garbage -d to remove unused Nix store paths. However, the command failed with the following error:

error: cannot delete path ‘/nix/store/xs3gk42g7dlsndzwgx72c71h76clzfsv-libbpf-1.4.2’ because it is in use by ‘/nix/store/rhq3rwyghbqq4lnkmdf4vsrazr2aa5a7-systemd-255.9’

This indicates that a dependency on /nix/store/rhq3rwyghbqq4lnkmdf4vsrazr2aa5a7-systemd-255.9 is keeping /nix/store/xs3gk42g7dlsndzwgx72c71h76clzfsv-libbpf-1.4.2 in use, preventing the garbage collection from completing.

I also tried using lsof /ephemeral/nix to identify the specific process holding onto these files, but the command did not provide a clear result. Reviewing the ps aux output didn’t immediately reveal an obvious culprit process that I could safely terminate.

As I cannot directly stop system-level processes like systemd or reliably identify the process causing this lock, I am unable to free up the necessary space on /ephemeral myself.

Could you please assist me in resolving this “No space left on device” error and clearing the /ephemeral filesystem?

Thank you for your help.

Hi, I think something else may be going on, /ephemeral is not a user allocated storage space and is expected to be full.

It is possible you are running out of home disk space, can you check the space in /home?

Ok. Sorry but I’m not an expert. Would this help?

nn-10569477:/home$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.9G 12K 3.9G 1% /
tmpfs 64M 0 64M 0% /dev
shm 64M 0 64M 0% /dev/shm
overlay 25G 11M 24G 1% /nix
tmpfs 3.9G 0 3.9G 0% /nix/store/qdcbgcj27x2kpxj2sf9yfvva7qsgg64g-glibc-2.38-77/etc
overlay 25G 11M 24G 1% /etc/bashrc
overlay 46G 33G 13G 72% /mnt
/dev/sda1 46G 33G 13G 72% /etc/hosts
/dev/sdb 23G 23G 0 100% /ephemeral
/dev/disk/by-id/google-home 9.8G 5.4G 4.0G 58% /home
tmpfs 3.9G 0 3.9G 0% /run
tmpfs 3.9G 0 3.9G 0% /var