Debian 13 Moves to tmpfs for /tmp Directory

Debian 13 introduces tmpfs for /tmp and timed cleanup for /var/tmp, aligning with standard practices in the upcoming Trixie release.

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.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%