Question about .available()

How can I clear the buffer?

The same way you clear the data you want, by reading.

while( Serial.available() ) Serial.Read();