diff --git a/helpers/generate_common.sh b/helpers/generate_common.sh
index c039e23366e113c980864eb3b885b0b0747f5937..fa0ba7e2e32ec8139736390f6cca037e91e71786 100644
--- a/helpers/generate_common.sh
+++ b/helpers/generate_common.sh
@@ -76,7 +76,7 @@ updater_ng_repodetect() {
 	local BOARD="${2:-mox}"
 	local VERSION="$(curl "https://repo.turris.cz/$REPO/packages/$BOARD/turrispackages/Packages" \
 			| sed -n '/^Package: updater-ng$/,/^$/p' \
-			| awk '/^Version: /{ gsub("-[^-]*$","",$2); print $2 }')"
+			| awk '/^Version: /{ gsub("-.*$","",$2); print $2 }')"
 	if [ -z "$VERSION" ]; then
 		echo "Detection of updater-ng version from repository failed. Using $UPDATER_VERSION instead."
 	else