How can I remove the last 5 lines in bash history? So that when I reload the Ubuntu server, or restart it they're not there at all?
history -c only removes it from current session, but when I re-login I see the commands again, I want to clear the last 5.
Then i'll see the numbers of the commands e.g:
489 cd ..
490 cd .zshrc
491 cat .zshrc
Then I run for example:
history -d 489
Then i close terminal and reopen it and i still see line 489 it was only deleted for that current session, how do I delete it permentantly from all sessions going forward?