Deleting All Default Wiki Pages in Trac

I am currently evaluating Trac as a web management tool for a school project. By default Trac comes with lots of standard wiki content, mostly help instructions, which I don’t need. So here is a simple script which saves the current wiki content and then deletes all pages.

cd /path/to/your/trac/project
mkdir wiki-exported && trac-admin . wiki dump wiki-exported
for page in $(trac-admin . wiki list | awk '{  if($1 ~ /^(Trac|Wiki).*$/) print $1}'); do 
    $(trac-admin . wiki remove $page); 
done

If you want to restore your wiki content then run

trac-admin . wiki load wiki-exported

To upgrade to the latest help instruction issue the following command

trac-admin . wiki upgrade

Marc