How to empty (clear) the logcat buffer in Android


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.

1/12/2016 1:06:05 PM

Accepted Answer

adb logcat -c

Logcat options are documented here:

3/17/2016 6:13:48 PM

The following command will clear only non-rooted buffers (main, system ..etc).

adb logcat -c

If you want to clear all the buffers (like radio, kernel..etc), Please use the following commands

adb root
adb logcat -b all -c


adb root
adb shell logcat -b all -c 

Use the following commands to know the list of buffers device supports

adb logcat -g
adb logcat -b all -g
adb shell logcat -b all -g

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow