In fact there appears to be so many circular dependencies with the test data that it isn’t possible to delete it all other then by deleting the whole ERPNext install and starting again?
I’m only evaluating ERPNext at this stage so I have no critical data to lose but it would be helpful if I knew how to prevent the database being filled with test data in the first place…
Sorry, I should have worked this out sooner, I ran the bench run-tests command and it appears that this was the cause of the generation of the test data, perhaps the bench run-tests command needs a warning to indicate that it will populate your database with test data than cannot easily be removed…?