Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use to debug some problems on my Mac. I've cleared out the log files from inside /Library/Logs and ~/Library/Logs but I still have around 4000 messages left! I tried the Clear Display button but that only clears the application temporarily.

How do I clear out the log?

enter image description here

share|improve this question
What does that big Clear Display button do? – Dennis Williamson Feb 15 '11 at 17:14
You do realize the messages are written chronologically...why not just identify the log you actually need to look at, select it, then sort by date/time? Or even better, open Terminal, and use tail -f /var/log/logname to watch it... – peelman Feb 15 '11 at 17:59
up vote 3 down vote accepted

Clear the logs in /private/var/log - especially system.log. That file gets quite large. Then delete data in Macintosh HD/Users/"your user name"/Library/Logs. Delete everything in there. Next, go to Macintosh HD/Library/Logs and delete everything in there, too. It's safe to delete these log files and will not affect system performance.

share|improve this answer
Nice! I did have to delete everything inside of /private/var/log - even the archive files, but then it worked. Thanks! – cwd Feb 15 '11 at 17:27
I'm glad it helped! – Kevin Worthington Feb 16 '11 at 3:38

Basically, it sums up to this:

  • Applications can use the syslog API (bsd_in) and the asl API (asl_in) to log messages by handing them over to the syslog daemon (syslogd). Other data that gets logged can come from the kernel (klog_in) or from the network (udp_in).
  • All of these messages are handled by syslogd, which outputs log messages both the BSD way (bsd_out: it writes stuff into various basic log files like /var/log) and into a unified log message store (asl_action: the message store is in /var/log/asl/*).
  • Console displays both kinds of logging facilities: "classical" log files and database searches. Even if you delete all .log files, the database is still intact and full of entries.

Also, if you want to troubleshoot, there should be no need to clear old log files, you will only have to be more specific over what you want to read from the log. A good starting point would be using "syslog" (not syslogd!) from the command line, where you can parse logs with more specific instructions (have a look at man syslog). So if you were to parse all messages logged by Safari in the last 5 hours you would run:

syslog -k Facility -k Time ge -5h -k Sender Safari

or to see all messages, but not those of Mail:

syslog -k Facility -k Sender ne Mail 

Trust me, even though this might look confusing, it´s far better to read logs on the command line than in

But if you want to keep on using Console you still might want to checkout the man page for aslmanager and syslog.conf to see how you can eg. configure where the files are kept, for how long, and how to archive them.

share|improve this answer

You must log in to answer this question.

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