This is a little weird. Look at your bash history like so: history | less Lines are numbered. If you want to delete line number N from the history, you do this: history -d N That works perfectly. Suppose you want to delete every line from line 6685 to line 6694. That is a lot trickier, at first. This fails with an error: history -d 6685-6694 This only reads the first number and ignores the second one: history -d 6685 6686 You might think that this would work, but you would be sorely mistaken: for line in $(seq 6685 6694) ; do history -d $line ; done The reason that fails is that when you delete line 6685, the line that used to be 6686 immediately becomes line 6685, so you end up deleting every other line, only deleting half of the ones you wanted to delete along with several other lines that you wanted to keep. This is the trick: for line in $(seq 6685 6694) ; do history -d 6685 ; done You delete line 6685 every time because succeeding lines keep moving up to become line 6685. It works. If you know a better way to do this, please tell us. Thanks. Mike