It's usually easier to use the line-kill character - typically CTRL-u or CTRL-x. (The command will tell you which. Article 5.9 shows how to change them.) The line-kill character will work on a command line (at a ) and in other places where the terminal is in . Some UNIX programs that don't run in cooked mode, like vi, understand the line-kill character, too.
Even better, many systems have a "word-erase" character, usually CTRL-w, which deletes only back to the previous whitespace. There's no need to delete the entire command line if you want to change only part of it!
On some systems with, though, the line-kill and word-erase characters may not work the way we've explained. That's because the command-line editing isn't done in cooked mode; the shell handles every character you type. Check your shell's manual page.