more /tmp on Mac OS X

I did some more research and finally found out a little more about what happens to /tmp. Actually a bit more about Mac OS X.

First, if you’re not paying attention like me, /tmp is a symlink to /private/tmp.

In Mac OS X 10.4 Tiger Apple replaced (or began to replace) cron, xintd, init, mach_d, the rc scripts, etc. with launchd. In /System/Library/LaunchAgents and /System/Library/LaunchDaemons there are a bunch of plists which run, start, schedule processes. In /System/Library/LaunchDaemons there are:,, which replace the similarly named cron jobs and execute items in the /etc/periodic/daily, /etc/periodic/weekly, etc/periodic/monthly directories.

So in /etc/periodic/daily we find 110.clean-tmps. You might think I just need to edit that? Don’t bother, it has a config file in /etc/defaults/periodic.conf. Find the line daily_clean_tmps_enable=”YES” or daily_clean_tmps_days=”3″. I changed mine to 20 or so, should be good enough for me.

I would caution against dropping lock files for long living processes in /tmp for the above process could throw them out. There are other configuration options in that file too, including an ignore list.

Comments are closed.