Dolphin creating thousands of empty folders in /tmp

❯ find /tmp/ -type d -name 'dolphin*' | wc -l
138724

Every folder I’ve checked is empty.

This is a big problem for me because it crashes many programs when I try to save files in /tmp/.

dolphin 25.08.2

Linux Zeus3 6.17.1-arch1-1

Why are you trying to save stuff in /tmp? Don’t do that, that is where the system stores temporal (hence tmp) files and folders apps need during execution. Most stuff gets erased out of /tmp when the apps stop needing them or the system restarts.

Don’t touch /tmp!

3 Likes

Um, is it my computer or not? I like to store stuff in /tmp that I only need temporarilly. Obviously I don’t save precious documents in there.

Regardless of where I store my files, is it expected behaviour that dolphin creates so many /tmp files that if you try to view that directory in many programs they crash?

Sure. You could also set fire to it, but I wouldn’t expect it to continue working very well after you did that.

The fact is there are system folders and files that, if you change them while the system is running, will likely lead to a crash.

1 Like

This is a known bug: https://bugs.kde.org/show_bug.cgi?id=510443

Until it’s fixed, you can work around it by not having Dolphin open and viewing /tmp.

3 Likes

There’s this ticket too - should it be closed as a dupe?

Source: this recent forum thread

1 Like

Instead of messing with the system /tmp/ folder, I suggest you create a local one for the user:

1 Like

I fancy the idea of a tempfs folder on the desktop (takes me back to my Amiga days, where we’d create space in ‘fast memory’ to avoid interacting with the physical…).

I don’t know enought about memory safety in Linux and TmpFS to be a good judge, but erring on the side of caution, I decided against storing personal temporary files in TmpFS.

Instead, as described in the blog post, I rely on systemd-tmpfiles to regularly clean up temporary folders for me. In my case, I have:

  • ~/Downloads/ – if a file has not been accessed for 2 weeks, if gets deleted
  • ~/sandbox/ – if a file has not been accessed for 12 weeks, it gets deleted

So for temporary projects like throw-away documents, scans, tests etc, I do that in ~/sandbox/.

I have to say this set-up has made my home directory much much cleaner. Several months in and I have not ran into a problem yet.

2 Likes