Some “phantom” files continue to occupy disk space

Disk space issue with GNOME trash on Manjaro

I’ve noticed that even after emptying the trash, some “phantom” files continue to occupy disk space. Running

bash

gio trash --empty

doesn’t always solve the problem. After execution, I sometimes see leftover files (with names like “gosh”) reappearing in /tmp, even though they had already been deleted.

This makes it look like the trash is empty, but hidden files are still consuming space. Has anyone else experienced this behavior with GNOME on Manjaro? Is it a known bug or a regression in recent builds?

Welcome to the forum! :vulcan_salute:

No, they’re not. :wink:

The contents of /tmp live on a tmpfs in Manjaro. In other words, they exist only in virtual memory, and they will be removed upon shutdown/reboot, or — if the machine is kept running 24/7 — by systemd-tmpfiles-clean.timer. :wink:

It really depends which files you mean exactly. Linux doesn’t have the concept of “hidden” files. A file either exists or doesn’t.

/tmp is basically a ram disk (unless you configured otherwise) - it will be emptied on restart - or using a timer as noted above.

If you are using btrfs file system you will not be able to use the usual programs - like du and df as the concept for btrfs is more like used or unallocated.

You will need to use the btrfs programs designed for this purpose

Even though I understand what you mean, the way you’re wording it is incorrect. :face_with_diagonal_mouth:

UNIX does have the concept of hidden files — i.e. files and directories whose name starts with a period (.) — but all this means really is that they are hidden from a normal directory listing, given that they are only configuration files and/or placeholders. This makes it easier to distinguish one’s project files and documents from one’s configuration files.

btrfs snapshots are also stored in a hidden directory, by the way.


A filesystem in virtual memory. :wink:

The difference between ramfs and tmpfs is that the contents of a tmpfs can be paged out to the swap device, while the contents of a ramfs cannot. :wink:

Later I realized these were actually Hugging Face model files from LM Studio that I had previously deleted. Somehow they were still showing up in /tmp after emptying the trash.
could involve how the kernel handles temporary files and cleanup.

As I said, they will be either removed by systemd-tmpfiles-clean.timer or upon shutdown or reboot, depending on which comes first.

While running a VirtualBox VM, the system even triggered a disk space alarm. If I waited for the timer or tried to reboot, the VM screen froze, which is quite annoying. This suggests that the trash cleanup process may not be aggressive enough in certain conditions.

:backhand_index_pointing_right: Possible improvements could include:

  • Alternative trash emptying conditions such as forcing immediate deletion of large files instead of moving them to trash.

  • Kernel-level cleanup options to handle temporary files more reliably.

  • VirtualBox disk management strategies to avoid freezes when the host system runs low on space.

This is probably the result of the fact that Manjaro now defaults to using btrfs upon a fresh installation if the system’s administrator did not choose otherwise.

virtualbox cannot handle btrfs as the back-end for its filesystem images, because btrfs uses copy-on-write and sparse files. Therefore, if you are going to use virtualbox, then you should put its disk images on an ext4 filesystem.

Please don’t use A.I. slop for posting.

sorry im not good on ingles lenguaje. i need a translator. seems the Ai kind add flavor words. thank you. i aprecied the comment .

Just for the record, if you’d rather post in Spanish, we do have an Other Languages > Español category. :wink:

/tmp is for temporary files, it has no relation to the trash. It doesn’t use up space in your filesystem (unless it’s swapped to a swapfile).

… Or swap partition, which is still the recommended approach. :grin:

Indeed, but if they’re using a swap partition then it wouldn’t take up any space in their filesystem.

This might also suggest that you may not have allocated sufficient space for your volumes.

How about posting the following information here:

sudo btrfs fi usage /

You find good Information about Btrfs in the wiki, in Out of space and btrfs layout info

:footprints: