If you want to keep the last N lines, use `tail` (for example, the last 20 lines):
tail -n 20 "$HISTFILE" > ff && mv ff "$HISTFILE"
I'm using the `HISTFILE` variable since this will always point to your history file, even if you've changed its name.