Different shells provides similar, yet not the same methods to clear history. This feature is extremely useful if either by accidence or by command requirements, we typed secrets / passwords or other confidential data.

bash

history -c
# Sometimes required
rm ~/.bash_history

zsh

history -p
# Sometimes required
rm ~/.zsh_history

https://unix.stackexchange.com/a/607556 https://ss64.com/bash/history.html https://linux.die.net/man/1/zshbuiltins
⤧  Next post Remove kerenels ⤧  Previous post ALT Codes