I've read that /tmp will automatically have files deleted that are older than 7 days or upon restart, but I can't seem to find where this is documented. Can anyone point me to a man or web page from Apple?

  • good question, but what is it for? just knowledge or a problem to be solved.
    – Ruskes
    Jul 9, 2014 at 10:34
  • possible duplicate of /private/tmp vs /private/var/tmp vs TMPDIR
    – mmmmmm
    Jul 9, 2014 at 10:48
  • @Buscar: Well, if I find the documentation on it I was going to see if what I read was accurate and if the age before deletion was customizable. But that's secondary to my curiosity about it. I figure it's got to be documented somewhere, but I don't know where.
    – Chuck
    Jul 9, 2014 at 11:03
  • 1
    Reading the config file lead me eventually to /etc/periodic/daily/110.clean-tmps, which, given the config file, ostensibly confirms that cleanup is supposed to happen to /tmp every 3 days, but it would seem that reading the bash scripts can't be the only place this is documented.
    – Chuck
    Jul 9, 2014 at 11:27
  • 1
    For system-level stuff like this, reading the source code often is the best (and most accurate) documentation you can get.
    – nohillside
    Jul 9, 2014 at 11:46

2 Answers 2


There is a little documentation here on the background tasks that do things like clear up the /tmp folder, but it is marked as archived now and Apple don't seem to have released an updated version.

There should be a log at /var/log/daily.log for the daily script that (amongst other things) clears out the /tmp folder.


As @patrix pointed out, in cases like this, the source code is sometimes the best documentation, perhaps especially for interpreted (as opposed to compiled) software, so the documentation for this is currently found in /etc/periodic/daily/110.clean-tmps and /etc/defaults/periodic.conf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .