diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml
index fb2fbeed38b41a3f7c267bb39536bd3351fcdc3f..dce54ff05aea21fa2d1a344276347b7e3a7a3522 100644
--- a/templates/gitlab-ci-python.yml
+++ b/templates/gitlab-ci-python.yml
@@ -1286,8 +1286,6 @@ py-release:
     # install git and OpenSSH
     - maybe_install_packages git openssh-client
   script:
-    - apt-get update
-    - apt-get install -y git openssh-client
     - git config --global user.email "$GITLAB_USER_EMAIL"
     - git config --global user.name "$GITLAB_USER_LOGIN"
     - git checkout -B $CI_COMMIT_REF_NAME