How do delete highlighted text in a command line
Terminal doesn't really care what you have selected, other than you can copy selected - it uses the cursor position for operations.
Opt ⌥ → or ← will jump the cursor one word at a time
Ctrl ⌃ W will delete the word immediately left of the cursor
Cmd ⌘ A or E will take you to the beginning or end of a line
Ctrl ⌃ U will delete to the beginning of the line
Ctrl ⌃ K will delete to the end of the line
There are many more - see TechRepublic - 20 Terminal shortcuts developers need to know