diff --git a/Makefile b/Makefile
index b3b7beddbd07760eeedc34ce13ab331d31236a24..202b9b55c99578861b55d44d5d16df919b986c9c 100644
--- a/Makefile
+++ b/Makefile
@@ -118,8 +118,8 @@ integration-test-debug-compose-down:
 
 
 longevity-test: generate-gokms-certs build-images install-gosdnc
-	rm -r longevity-tests/akms1-logs
-	rm -r longevity-tests/akms2-logs
+	rm -rf longevity-tests/akms1-logs
+	rm -rf longevity-tests/akms2-logs
 	docker compose -f longevity-tests/docker-compose.yml down
 	docker compose -f longevity-tests/docker-compose.yml up -d
 	echo "Will add devices, can take a while"
@@ -167,7 +167,7 @@ generate-etsi-rest-server:
 
 # Warning: Depending on your go and development configuration might also clean caches, modules and docker containers from your other projects.
 clean:
+	docker system prune -af
 	rm -rf $(BUILD_ARTIFACTS_PATH)
 	rm -rf $(TOOLS_DIR)
 	$(GOCLEAN)
-	docker system prune -af