Getting rid of Putty – ssh history

for ((i=1; i<=5; i++)); do history -d $(history 1 | awk '{print $1}'); done

to get rid of the last 5 lines / commands