This is expected behavior. Since /tmp is a tmpfs by default, the default /usr/lib/tmpfiles.d/tmp.conf is configured with a 10d cleanup age for /tmp, but it is *not* configured to clean /tmp at boot, because that is unnecessary for a tmpfs.
If you want to clean /tmp at boot *and* have your tmp.mount override, you need to also override tmpfiles.d/tmp.conf with appropriate settings for /tmp and /var/tmp (because both of these are listed in the default tmp.conf). ** Changed in: systemd (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/2080972 Title: /tmp as non-tmpfs doesn't get cleaned upon reboot Status in systemd package in Ubuntu: Invalid Bug description: On Oracular, it seems `/tmp` doesn't get cleaned on reboot, when the `/etc/systemd/system/tmp.mount` file is present. Reproducer: $ wget https://cloud-images.ubuntu.com/minimal/daily/oracular/20240913/oracular-minimal-cloudimg-amd64.img $ qemu-img resize oracular-minimal-cloudimg-amd64.img +20G $ cat >user-data <<EOF #cloud-config password: ubuntu chpasswd: { expire: False } ssh_pwauth: True EOF $ cloud-localds user-data.img user-data $ kvm -m 2G -smp 2 -hda oracular-minimal-cloudimg-amd64.img -hdb user-data.img In the VM, logged in with `ubuntu`/`ubuntu`: $ sudo touch /etc/systemd/system/tmp.mount $ df -h | grep '/tmp' # you can verify that /tmp is a tmpfs, because this is the default now $ sudo systemctl reboot # Wait for reboot, then login again $ echo Hello there >/tmp/will_stay $ df -h | grep '/tmp' # you can verify that /tmp is not a tmpfs anymore $ sudo systemctl reboot # Wait for reboot again, then login again $ cat /tmp/will_stay Hello there At least our auto-upgrade-testing tooling relies on `/tmp` getting cleaned upon reboot, and as a user, this is what I expect too. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2080972/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp