"No space left on device" but I have 174 GiB free

I don’t know how to categorize this or where to report it. I see “no space left on device” when I try to create files at the command line, e.g. in Python:

==> Error: OSError: [Errno 28] No space left on device

but df -H reports:

[benwibking@bens-macbook-pro ~]$ df -H
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.2M     0  4.2M   0% /dev
tmpfs           8.1G     0  8.1G   0% /dev/shm
tmpfs           3.3G   14M  3.3G   1% /run
/dev/nvme0n1p6  195G   20G  174G  10% /
vendorfw        8.1G   79M  8.1G   1% /usr/lib/firmware/vendor
/dev/nvme0n1p6  195G   20G  174G  10% /home
/dev/nvme0n1p5  1.1G  396M  549M  42% /boot
/dev/nvme0n1p4  524M  133M  392M  26% /boot/efi
tmpfs           8.1G  8.1G     0 100% /tmp
tmpfs           1.7G  6.7M  1.7G   1% /run/user/1000

Is this an Asahi issue, or some strange btrfs issue?


It looks like your system is low on memory. You might check the output of the free command.

Scratch that, it looks like you just have too much data stored under /tmp. Delete some stuff. :slight_smile:

Yes that /tmp is full, and since I’m totally worn out, I asked “AI” which gave some seemingly good introductory info (be careful what You are going to apply, I suggest not to go on cron job, third [**3.] AI’s idea). Here is the transcript:

There are a few ways to free the temp directory in a Linux based OS.

**1. Using the `rm` command**

The `rm` command is used to delete files. To delete all files in the temp directory, you can use the following command:

`sudo rm -rf /tmp/*`

The `sudo` command is required to delete files in the `/tmp` directory, as it is a system-wide directory.

**2. Using the `find` command**

The `find` command can be used to find files that match a certain criteria. To find all files in the `/tmp` directory that are older than a certain number of days, you can use the following command:

`sudo find /tmp -type f -mtime +X`

The `-type f` option specifies that you are only interested in files. The `-mtime +X` option specifies that you only want to find files that are older than X days.

Once you have found the files that you want to delete, you can use the `rm` command to delete them.

**3. Using a cron job**

You can also use a cron job to automatically delete the temp directory on a regular basis. A cron job is a task that is scheduled to run at a specific time or interval.

To create a cron job to delete the temp directory, you can use the following command:

`0 0 * * * sudo rm -rf /tmp/*`

This cron job will run at 00:00 (midnight) every day.

Which method you choose to use will depend on your specific needs and preferences.

Here are some additional things to keep in mind when freeing the temp directory:

* Be careful not to delete any important files.
* If you are using the `find` command, make sure to specify the correct criteria so that you do not delete any files that you do not want to delete.
* If you are using a cron job, make sure to set the correct time and interval so that the temp directory is not deleted too often or too rarely.

I hope this helps!```

It may also be an inode/metadata exhaustion problem. You may also want to do a btrfs filesystem df / to see what is being exhausted on your btrfs volume.


I’ve seen circumstances produce the same message when the actual issue is that the file system in question is mounted read-only.

I see this thread is already marked “solved”, but leaving this here in case future me (or anyone else) gets led hear by that particular message.