How to empty (clear) the logcat buffer in Android [duplicate] How to empty (clear) the logcat buffer in Android [duplicate] android android

How to empty (clear) the logcat buffer in Android [duplicate]


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 rootadb logcat -b all -c

or

adb rootadb shell logcat -b all -c 

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

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


I give my solution for Mac:

  1. With your device connected to the USB port, open a terminal and goto the adb folder.
  2. Write: ./adb devices
  3. The terminal will show something like this:List of devices attached 36ac5997 device
  4. Take note of the serial number (36ac5997)
  5. Write: ./adb -s 36ac5997 to connect to the device
  6. Write: ./adb logcat

If at any time you want to clear the log, type ./adb logcat -c