/var/tmp
is not defined in POSIX, but is defined in FHS :
5.15. /var/tmp : Temporary files preserved between system reboots
5.15.1. Purpose
The /var/tmp directory is made available for programs that
require temporary files or directories that are preserved between
system reboots. Therefore, data stored in /var/tmp is more
persistent than data in /tmp.
Files and directories located in /var/tmp must not be deleted
when the system is booted. Although data stored in /var/tmp is
typically deleted in a site-specific manner, it is recommended
that deletions occur at a less frequent interval than /tmp.
This is a very difficult definition for real life situations.
A package does not use /tmp
, because the files should not be deleted on reboot for some reason.
If a package fails to cleanup its remains in /tmp
the distribution/admin can safely clean at reboot.
When and how should we clean up /var/tmp
? What can packages and software developers expect from /var/tmp
?
Do we have to clean /var/tmp
after n
reboots?
(see also https://unix.stackexchange.com/questions/86297/what-can-go-wrong-if-var-tmp-is-on-a-temporary-filesystem and https://unix.stackexchange.com/questions/30489/what-is-the-difference-between-tmp-and-var-tmp)
Asked by Jonas Stein
(4298 rep)
Apr 10, 2022, 04:08 PM
Last activity: Apr 10, 2022, 06:47 PM
Last activity: Apr 10, 2022, 06:47 PM