How to empty (clear) the logcat buffer in Android

kaskelotti picture kaskelotti · Jul 23, 2010 · Viewed 117.1k times · Source

How can I empty (clear) the logcat buffer in Android?

I use adb logcat from command line and pipe the output to a file, since the DDMS has a very limited buffer. At the moment, when I restart my app (after fixing bugs etc) the logcat buffer has data from the previous launch as well. Even uninstalling the app does not clear the buffer. The only way I've found so far to clear the buffer, is reboot. This is effective, but would like to know if there's an easier way.

Answer

Michael Burr picture Michael Burr · Jul 23, 2010
adb logcat -c

Logcat options are documented here: http://developer.android.com/tools/help/logcat.html