diff --git a/windows/scripts/compile.sh b/windows/scripts/compile.sh
index 2c201cf8915342c0f87a3bf7e89927f22bc4c31f..5b573a0ca78927940183a9e13335dd0a438d850d 100755
--- a/windows/scripts/compile.sh
+++ b/windows/scripts/compile.sh
@@ -25,5 +25,4 @@ done
 
 mkdir build && cd build && \
 x86_64-w64-mingw32.static-cmake .. && make -j$(nproc) && \
-mv cellframe-node*.exe $DESTDIR  && make clean && cd .. && rm build || echo "error $?" && exit $?
-
+mv cellframe-node*.exe $DESTDIR  && make clean && cd .. && rm -r build || echo "error $?" && exit $?