history clear linux code example
Example 1: bash history delete entry
Just check the enumeration of your commands history and then delete them:
history -d 7 #Deletes seventh command in your history list
Example 2: how to delete command from terminal history
## Delete the bash history entry at offset OFFSET ##
history -d offset
history -d number
history -d 1013