diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9079d4f3f2f637cf931cc93887b6035336d1afa5..5c4373fb062d3d59e5a33e144689376ba635a969 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -69,7 +69,7 @@ deploy:
     - !reference [.workspace, script]
     # We are in the root of the git-repo workspace.
     - git clone https://user:$OHOS_AGGREGATED_DOCS_TOKEN@git.ostc-eu.org/OSTC/infrastructure/openharmony-readthedocs-aggregated.git aggregated
-    - (cd aggregated && find . -maxdepth 1 -not -path ./.git -not -path . -exec rm -rf {} \;)
+    - find aggregated -maxdepth 1 -not -path aggregated/.git -not -path aggregated -exec rm -rvf {} \;
     - tar -c --dereference -C docs --exclude ./.git --exclude ./.gitlab-ci.yml . | tar -x -C aggregated
     # Commit and push back, if something changed.
     - |