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.