diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index 1d3b099..e64e447 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -202,14 +202,6 @@ for branch in "$ypdocsbranch" dunfell $(git branch --remote --contains "$first_s
     git checkout origin/master sphinx-static/switchers.js.in set_versions.py
     if [ -e poky.yaml ]; then
         cp poky.yaml poky.yaml.in
-        case $branch in
-            yocto-*)
-                ./set_versions.py $(echo "$branch" | sed 's/yocto-//')
-                ;;
-            *)
-                ./set_versions.py
-                ;;
-        esac
     fi
 
     (
