In Terminal, how to erase typed command quickly?
You can cancel current command with ⌃ CTRL+c.
You can clear command to the beginning with ⌃ CTRL+u.
To clear line after the cursor press ⌃ CTRL+K.

Here are some great answers on StackOverflow.