3

Before the advent of systemd, my /tmp was cleaned when and only when I rebooted my machine. I was happy.

Now systemd has changed this decades-old default so that my /tmp is cleaned every 24 hours, it seems. I am not happy.

How to get the old please-do-not-touch-my-/tmp-except-when-rebooting behavior with systemd?

I've seen related Q&A's here, but the answers are all too complicated for me:

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
  • Which ones are related? Perhaps we can edit one of those answers to make it clearer. – roaima Mar 21 '19 at 10:06
  • Even if the answers are too complicated it would be good to [edit] the question an add links to these answers. – Bodo Mar 21 '19 at 10:08

1 Answers1

3

put this into /etc/rc.local:

# disable the daily cleaning
systemctl disable systemd-tmpfiles-clean.timer
# make sure /tmp is cleaned now (might be superfluous, but what the heck?)
systemctl start systemd-tmpfiles-clean.service

and enable rc.local:

 systemctl start rc-local.service
Uwe Ohse
  • 142
  • 3