diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ccb93d51a506e987aa59237e92ac56a6d7795b36..f5040477ef6f5f9317ec6dfea8d72e85c697cd36 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,6 +48,7 @@ workflow:
 .ubuntu-template-job-default: &ubuntu-job
   image: gitlab-registry.cern.ch/geomodeldev/ubuntu-geant4-image:main-base
   before_script: 
+    - sudo apt-get update && sudo apt-get dist-upgrade
     - sudo apt-get update && apt-get install -y libgtest-dev
   rules:
     - if: $CI_PIPELINE_SOURCE == "merge_request_event"