My system has begun warning of lack of space in user-tmp folder

When I check the ‘user-tmp’ folder, it has over 800 sub-folders (most of them with a small padlock on it). Is it safe (or even possible) to remove those folders? I have found a link that describes what one person did to maintain his folder:

Has anyone else tried that? Is that safe?
If that is an acceptable method, what is meant by the last bit of code (“man tmpfiles.d”). It seems like code for some sort of manual delete, but I’m not sure why one would need that.

are you using btrfs you might be running out of space, in yast find the snapper module and delete a few snapshots
that’s safe to do, but if it’s a btrfs issue removing them won’t get you much if any hard drive space

Well /usr/tmp is not a real directory and simply links to /var/tmp. It can have a lot of files but generally they are meant to be preserved between boots. Also you should not delete any while running do so from a external boot/recovery disk. But this is more likely a problem with snapper using up space so maybe release some snapshots. Perhaps you did not allow enough space for the root BTRFS file system???

Yes, the file system is btrfs. The systems partition is 20 gigs.

Yes too small for snapper to work recommended minimum is 40 gigs. Remove any snapshots and turn snapper off. I think can be done from Yast. You can modify frequency of snapshots but with only 20 gig you would always be running at the edge.

Could I not shrink my data partition and enlarge the systems partition, or is that too risky?

Can be done but is tricky. Better to back important data and reinstall IMHO

Okay. Thanks for the help.

While the above advices seem to fit more or less your needs, I would like to draw your attention to some details of your question:

  • there is no “user-temp” folder/ Maybe googlathorpe is correct in assuming you mean the directory /usr/tmp, but please try to use the exact designations when you ask something. Confusion is easy to create, can lead to wrong advice, which in itself can lead to bad results.
  • directories (or folders in Desktop parlance) can not have lack of space. File systems can. But when some software tries to create a file in some directory like /usr/tmp and there is no space for it, it means that the file system, containing /usr/tmp runs out of space. In this case that is most probably the file system at / (the so called root file system). Creating a new file anywhere in such a full file system will give you the same problem.
  • Apart from acting on the fact that you have only 20 GB for the root file system and
    having snapshots on (which is as googlathorpe explains not a good combination), you can still configure your temporary directories to be emptied on boot. That is a separate and often usefull action.

To empty at boot, first make a copy (if /etc/tmpfiles.d does not exist, first create it):

cp /usr/lib/tmpfiles.d/tmp.conf /etc/tmpfiles.d/tmp.conf

Then change in /etc/tmpfiles.d/tmp.conf the lines about /tmp and /var/tmp e.g. to

D /tmp 1777 root root 1d
D /var/tmp 1777 root root 1d