Clear entered command in Intellij Idea Terminal

For me and for version 2018.3 Esc, Ctrl+C and typing cls all don't really clear the terminal, it just scrolls down so you don't see anything other than the current input line, but you can scroll back up anyway.

This might be enough for most, but as soon as you search for sth in the console using Ctrl+F you also search the old content you were trying to get rid of.

This works as of version 2018.3:

Ctrl + K (Default and Visual Studio Keymap)

Note: the terminal window must have focus!


My answer is specific to Windows as I don't have another platform handy at the moment.

If you open the Terminal tool window within IntelliJ IDEA to use the command prompt, and start typing a command, but realize that your command isn't what you want to do and want to erase it, you can use the Esc key to erase the current line. This isn't really an IDEA-specific shortcut, it's standard within the Windows command prompt.

If after running a command, you want to clear the commands you've run and their output from the screen, you can just run the cls command, which again is a standard command prompt feature.