delete the last line of the index