Tmp folder auto delete

Hi,

How can I automate the deletion of the tmp folder in OpenSuse Leap 15.5?

When you boot the system on a regular base (e.g. daily or weekly), you can make /tmp a temporary file system. That means it will be in memory and thus lost at shutdown.

Example of an entry in /etc/fstab

tmpfs  /tmp   tmpfs  size=25%,uid=root,gid=root,mode=1777  0  0

Adapt as needed.

Please do not forget to empty the present /tmp directory after you added this to /etc/fstab and before the shutdown. Else the old contents will still fill some diskspace.

1 Like

Many thanks indeed

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.