In this short post you can find where it is stored and how to edit PyCharm terminal history. This is useful when you mistakenly paste huge text in your terminal. The article is written about Linux Mint but the same will apply for Ubuntu and with small changes to Windows(works for IntelliJ too).

Step 1: Locate PyCharm terminal folder

The first step is to find where is stored you terminal history of PyCharm or IntelliJ. This can be done by simple search for pattern: /JetBrains/PyCharm*/terminal/history

In Linux the command will be:

locate */terminal/history

result in:


As you can see there is a difference between the version of PyCharm2019 and PyCharm2020. So you can find it manually if you know what is the version of your IDE.

Step 2: Find the last file in the PyCharm folder

Next step is to find the latest file in the folder from the previous step.
You can open it with a text editor like Sublime and edit the file.


Then you can edit or remove the lines. Be careful edit history file while PyCharm is closed otherwise the history might be restored from the cache!