For security reasons, you may want to clear out your bash command-line history file periodically. Use the following commands to delete / truncate your bash command history record.
history -c # clear the bash runtime history list history -w # write the cleared list to disk (save)
The following articles were used for inspiration and reference:
- Learn Bash: Remove Commands From Your History (rawsyntax.com)
- Bash Reference Manual 9.2 Bash History Builtins (gnu.org)