To show history command
$history
To delete some history by delete line number with -d
$history -d line number
$history -d 1617
To delete all history with -c
$history -c
Or alternative command
$cat /dev/null > ~./bash_history
Sort way
$> ~./bash_history
To Re run last command
$history
1610 ls -lF
1611 history
1612 speedtest-cli
1613 history
1614 history -d 1611
To Re run command by line number with !
$!1612