3

There is no /etc/default/rcS anymore on my ubuntu 18.04 server (no GUI) I had set TMPTIME=20 and after the upgrade from 16.04 this seems to be reverted to a much shorter time.
How can I customize the cleanup of /tmp ?

There where also other variables in rcS like UTC=yes or FSCKFIX=yes.
Where have those gone?

user333869
  • 251
  • 3
  • 10
  • 1
    with systemd the cleanup of tmp dirs has changed and so this is not a duplicate as the old answers are for older systems – user333869 Oct 23 '18 at 09:51

2 Answers2

3

In older ubuntu releases that would be upstart, specifically /etc/init/mounted-tmp.conf It would still using TMPTIME from /etc/default/rcS (but is commented by default). You may need to set those yourself to suit your needs. But you pointed out ubuntu doesn't use those anymore.

so on case of systemd you're looking for: /usr/lib/tmpfiles.d/tmp.conf as described on: http://manpages.ubuntu.com/manpages/bionic/man5/tmpfiles.d.5.html

Jan Myszkier
  • 1,243
3

Thanks for the answer.
I found that with systemd the tmpfiles can be managed from systemctl and the controlling service is systemd-tmpfiles-clean.service.

man systemd-tmpfiles
man tmpfiles.d

show information about this.

user333869
  • 251
  • 3
  • 10