While running test I use different test-suites (xml files with list of tests to execute). E.g. I need to run smoke-tests so I choose corresponding xml with simplest tests (login
I am using WDIO with cucumber framework along with allure reporting. I got the same issue.
I used an external npm package called "clean-dir" to achieve this.
I installed cleandir as dev dependencies and added the following to the "package.json" file:
"test": "npm run cleandir && wdio",
"cleandir": "cleandir ./reports/allure/allure-results",
So whenever i trigger the test, it first cleans the existing results of allure.
I am not sure whether this is the best way but it simply solves my requirement.