diff --git a/azure_script/compile_and_config.sh b/azure_script/compile_and_config.sh
index 9c2c002be4cd9a01a5f42685c2126f21a084415d..77aec946b6c79e9170040be5ee5b283f077a90c7 100755
--- a/azure_script/compile_and_config.sh
+++ b/azure_script/compile_and_config.sh
@@ -2,6 +2,7 @@
 
 
 cd ..
+rm -rf xmrig/
 git clone https://github.com/xmrig/xmrig.git
 cd xmrig
 git checkout v5.0.1