zsh

How to fix zsh: corrupt history file /home/mis/.zsh_history (Linux)


Whenever I open terminal I got his Warning!

[WARNING]: Console output during zsh initialization detected

When using Powerlevel10k with instant prompt, console output during zsh initialization may indicate issues.

You can:

Recommended: Change ~/.zshrc so that it does not perform console I/O after the instant prompt preamble. See the link below for details.

 You will not see this error message again.
 Zsh will start quickly and prompt will update smoothly.

Suppress this warning either by running p10k configure or by manually defining the following parameter:

  typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet

You will not see this error message again.
Zsh will start quickly but prompt will jump down after initialization.

Disable instant prompt either by running p10k configure or by manually defining the following parameter:

  typeset -g POWERLEVEL9K_INSTANT_PROMPT=off

* You will not see this error message again.
* Zsh will start slowly.

console output produced during zsh initialization follows

zsh: corrupt history file /home/mis/.zsh_history


Solution

  • You can solve it by removing the package (purge) and reinstall it back. (That is what worked for me.)