How to remove all tickets from a Trac instance

published Apr 24, 2012 03:26   by admin ( last modified Apr 24, 2012 03:26 )

Note that this is if you use bash as your shell. Tested on Debian 5. Please note that this is on a strictly "worked for me" basis. Please test it in a safe environment first.

for f in {4..150} ; do trac-admin /path/to/trac-instance ticket remove "$f" ; done

...will delete tickets numbered from 4 to 150 and their associated data. It's ok to overshoot with numbers, the script will chug on.