Recently the Open Yahtzee website which runs Trac has fallen victim to several spam attacks. The spammers submit large number of tickets containing links to various sites. This post was written mainly to allow me to copy paste a command to delete a range of tickets at once, but I thought it may be useful to others as well.
for i in `seq FROM TO`; do trac-admin TRAC_ENV ticket remove $i ; done
Replace FROM and TO with the first and last ticket numbers of the range accordingly. TRAC_ENV should be the path to your project’s environment.
for i in `seq 9 32`; do trac-admin www.openyahtzee.org/ ticket remove $i ; done