diff --git a/tests/scripts/test011-subtree-repl b/tests/scripts/test011-subtree-repl
index 41fd7909d79a73202751c704f8be0a283dae9e63..972f0abec48b0000c3d45522b528159765704c0f 100755
--- a/tests/scripts/test011-subtree-repl
+++ b/tests/scripts/test011-subtree-repl
@@ -37,8 +37,8 @@ fi
 echo "Cleaning up in $DBDIR..."
 rm -f $DBDIR/[!C]*
 echo "Cleaning up in $REPLDIR..."
-rm -f $REPLDIR/[!C]*
 rm -f $REPLDIR/replica/[!C]*
+rm -f $REPLDIR/[!C]*
 
 echo "Starting master slapd on TCP/IP port $PORT..."
 . $CONFFILTER $BACKEND < $SUBMASTERCONF > $DBCONF