To align with contemporary standards used by other Linux distros and enhance system cleanliness and efficiency, Debianโs forthcoming release, version 13 (Trixie), will implement changes to the handling of temporary files. These modifications primarily concern the โ/tmpโ and โ/var/tmpโ directories.
Historically, Debianโs systemd implementation for managing โ/var/tmpโ has not included automatic cleanup, a policy that differed from many other distributions. However, recent discussions within the Debian development community, have led to a consensus for adopting more modern default settings that align closer to other Linux distros.
Specifically, these changes entail setting “/tmp” as a temporary file storage system (tmpfs) and introducing automated cleanup processes for “/var/tmp.”
The decision to shift โ/tmpโ to tmpfs means that this directory will be stored in volatile memory (RAM), which speeds up access to temporary files and reduces wear on persistent storage. A configuration widely used in the Linux world, favored for its performance benefits, particularly in environments requiring frequent access to temporary data.
Furthermore, for โ/var/tmp,โ Debian 13 will introduce a timed cleanup systemd service that automatically removes files older than 30 days. At the same time, the more frequently used โ/tmpโ directory will see an even shorter retention period, with files older than ten days being automatically deleted in new installations.
These settings are also managed through systemd, leveraging its “tmpfiles.d” configuration for periodic cleaning tasks.
For users and system administrators concerned about preserving existing behavior, Debian has made it straightforward to revert to the old one. They can easily adjust the settings by masking the systemd units or modifying the “/etc/tmpfiles.d/” configuration files, ensuring that the transition can be as flexible as needed.
For more detailed information, look at the discussion on Debianโs dev mailing list.
Of course, this is all supposed to happen in the upcoming Debian 13 (Trixie) release, which has no release date yet but is expected to debut a year from now, around mid-2025.