Mac OS X: How to force background maintenance tasks (logs and temporary items)
Summary
Mac OS X performs background maintenance tasks at certain times if the computer is not in sleep mode. If your computer is shut down or in sleep at the designated times, the maintenance does not occur. In that case, you may want or need to run these manually.
Mac OS X periodically runs background tasks that, in part, remove system files that are no longer needed. This includes purging older information from log files or deleting certain temporary items. These tasks do not run if the computer is shut down or in sleep mode. If the tasks do not run, it is possible that certain log files (such as system.log) may become very large.
These tasks are scheduled for 03:15 to 05:30 in your computer's local time zone. This is described further in "Mac OS X: Unexplained Disk Activity Produced by "find" Process".
If your computer is normally shut down at night, you may choose to force the process to start manually.
Products Affected
Mac OS X 10.4, Mac OS X 10.3, Mac OS X 10.2, Mac OS X 10.1, Mac OS X 10.0, Mac OS X 10.5
How to force maintenance tasks
You have two options: Use a third-party application or Terminal.
Use a third-party application
Some third-party applications may allow you to run these tasks whenever you wish. Four examples include:
- Macaroni by Thomas Harrington
- Mac Janitor by Brian R. Hill
- CronMaster by Dan Klein
- weRclean by Parental Advisory
You can search for these or other solutions at VersionTracker (http://www.versiontracker.com/).
Use the Terminal (advanced)
- Open Terminal (/Applications/Utilities).
- Type: sudo sh /etc/daily
Optionally, for Mac OS X 10.2 or later, you can use: sudo periodic daily
Tip: Typing "daily" runs tasks normally scheduled for a daily interval. Type "monthly" or "weekly" in place of "daily" to runs tasks scheduled for those intervals. Weekly tasks usually require a longer time to run than others. - Press Return.
- Enter your Admin password when prompted, then press Return.
- Quit Terminal when the task is complete.