Ubuntu: Bash history management

# To see top commands
history | awk '{print $2}' | sort | uniq -c | sort -rn | head
# To remove a commands from history
# Replace YOUR_COMMAND with the initials of the command you want to remove from bash history
sed -i '/^YOUR_COMMAND/d' ~/.bash_history