From 2f363eb1065cf39a04337eb95f8e5353e0a57ab2 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 7 Jun 2026 16:51:22 +0200 Subject: [PATCH] Clean up old .jar files after emulator update keeping only the latest --- update-Nitrov3.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/update-Nitrov3.sh b/update-Nitrov3.sh index c3a21ef..8f2df57 100755 --- a/update-Nitrov3.sh +++ b/update-Nitrov3.sh @@ -187,6 +187,10 @@ fi echo "--> Cleaning Yarn cache..." yarn cache clean 2>/dev/null || true +# 4. Remove old .jar files, keeping only the newest one +echo "--> Cleaning up old emulator .jar files (keeping the latest)..." +ls -t "$EMULATOR_DIR/Emulator/target"/Habbo-*-jar-with-dependencies.jar 2>/dev/null | tail -n +2 | xargs -r rm -f || true + # ---------------------------------------- # 6. Fix Permissions (www-data)