The .bash_history file located in a user’s home directory keeps a history of commands typed in the terminal. If you want to remove that history use the following commands
history -c && history -w
or
unset HISTFILE
$ history -d
$ echo "unset HISTFILE" >> /etc/profile
or
$ echo "unset HISTFILE" >> /home/tom/.bash_profile
$ for i in {1..N}; do history -d POSITION; done
POSITION is the line number in the history list from where you need to start deleting. N is no of the entries you want to delete. For example to delete 13 entries from line 986, type:
for i in {1..13}; do history -d 986; done
echo 'history -c && history -w' >> ~/.bash_logout