diff --git a/common/polkit-parsing.sh b/common/polkit-parsing.sh
index 9f3fccca0e180cbeca837bc11cc45557088efefe..38b48027c41bc1d0ad05522d0e6c5b52b1f29562 100755
--- a/common/polkit-parsing.sh
+++ b/common/polkit-parsing.sh
@@ -23,12 +23,17 @@ trap cleanup EXIT
 
 # Restart polkitd to enable debug support (the standard systemd .service file
 # starts it with --no-debug)
-if [ -e /usr/lib/policykit-1/polkitd ]; then
-	# Debian jessie; Ubuntu vivid; Apertis 15.03
-	polkitd=/usr/lib/policykit-1/polkitd
-else
-	# Debian experimental as of 2015-04; Apertis 15.06
+if [ -e /usr/libexec/polkitd ]; then
+	# Debian Bullseye, Apertis v2022 and v2023
+	polkitd=/usr/libexec/polkitd
+elif [ -e /usr/lib/polkit-1/polkitd ]; then
+	# Debian Bookworm, Apertis v2024+
 	polkitd=/usr/lib/polkit-1/polkitd
+else
+	# polkitd is called with errexit set to "off", then
+	# we have to fail before if the binary is not available.
+	echo "The polkitd binary was not found!"
+	exit 1
 fi
 
 ( set +e; sudo ${polkitd} --replace 2>&1 ) | sed 's/^/# /' | tee $TMPFILE &