diff --git a/.oniro-ci/test-generic.yaml b/.oniro-ci/test-generic.yaml
index e61f2cba11d64281a970b2b6e107c3c6b97cb658..1fa08b71e2c9127e0d1062108fa2b802cba36409 100644
--- a/.oniro-ci/test-generic.yaml
+++ b/.oniro-ci/test-generic.yaml
@@ -42,7 +42,7 @@
       -e 's,$callback_url,'"$CALLBACK_URL"',' job_def.yaml
     # Generate job definitions for zephyr build
     - |
-      mkdir lava_jobs
+      rm -rf lava_jobs && mkdir lava_jobs
       if echo "${CI_BUILD_JOB_NAME}" | grep -i "zephyr"; then
         for image in $(find artifacts/ -name "*.elf" -exec basename {} \;); do
           job_name=$(basename "${image}" ".elf")