In a shell, such as Bash, you can erase a full line using the following keyboard shortcuts:
Ctrl+C Cancel the current command/line.
Ctrl+E Ctrl+U Clean up the line (wipe the current line in the terminal)
Ctrl+A Ctrl+K Clean up the line (wipe the current line in the terminal)
Ctrl + U: This shortcut erases the line from the cursor's current position to the beginning of the line.
Ctrl + K: This shortcut erases the line from the cursor's current position to the end of the line.
Ctrl + L: These commands clear the entire screen, not just the current line (same as clear
command).