2

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:

  • Which ones are related? Perhaps we can edit one of those answers to make it clearer. – roaima Mar 21 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 at 10:08
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
  • Thank you very much; this seems to work just nicely. – Uli Fahrenberg Mar 30 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.