[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can/should I delete /tmp partition?



On 2025-08-10, Default User <hunguponcontent@gmail.com> wrote:
> Hi! 
>
> I just upgraded from Debian 12 to Debian 13.
> Debian 13 apparently uses a tmpfs file, instead of the 
> 2 Gb /tmp partition which I was using on Debian 12, 
> and which is no longer mounts automatically.
>
> So, can/should I delete the old Debian 12 /tmp partition? 
> And if so, what is the best (safest) procedure to do that?
>

https://www.debian.org/releases/trixie/release-notes/issues.html

5.1.6. The temporary-files directory /tmp is now stored in a tmpfs From
trixie, the default is for the /tmp/ directory to be stored in memory using a
tmpfs(5) filesystem. This should make applications using temporary files
faster, but if you put large files there, you may run out of memory.

For systems upgraded from bookworm, the new behavior only starts after a
reboot. Files left in /tmp will be hidden after the new tmpfs is mounted which
will lead to warnings in the system journal or syslog. Such files can be
accessed using a bind-mount (see mount(1)): running mount --bind / /mnt will
make the underlying directory accessible at /mnt/tmp (run umount /mnt once you
have cleaned up the old files).

The default is to allocate up to 50% of memory to /tmp (this is a maximum:
memory is only used when files are actually created in /tmp). You can change
the size by running systemctl edit tmp.mount as root and setting, for example:

[Mount] Options=mode=1777,nosuid,nodev,size=2G (see systemd.mount(5)).

You can return to /tmp being a regular directory by running systemctl mask
tmp.mount as root and rebooting.

The new filesystem defaults can also be overridden in /etc/fstab, so systems
that already define a separate /tmp partition will be unaffected.


Reply to: