A quick bit of shell magic to empty a Trac wiki database in a freshly installed Trac environment. In this example /var/www/html/trac
is assumed to be the Trac environment you created with trac-admin
.
$ for page in `trac-admin /var/www/html/trac wiki list | cut -d' ' -f1 | grep "^[A-Z]" | grep -v "Title"`; do trac-admin /var/www/html/trac wiki remove $page; done;
😉
Leave a Reply