diff --git a/gitlab/build.sh b/gitlab/build.sh
index ef92a4d4a0f525ad9688b9b4e2ef3212df689d99..1e2b3fe4288b52af6e28194cdc9963fb5681e0fe 100755
--- a/gitlab/build.sh
+++ b/gitlab/build.sh
@@ -24,3 +24,14 @@ export_env BOB_BUILD_NUMBER
 run_cmd cp ./ci/recipe_append.yaml conda/recipe_append.yaml
 
 run_cmd ${CONDA_ROOT}/bin/conda build --no-anaconda-upload --variant-config-files _ci/conda_build_config.yaml --python=${PYTHON_VERSION} conda
+
+# delete the bob packages from the cache otherwise the cache keeps increasing
+# over and over. See https://gitlab.idiap.ch/bob/bob.admin/issues/65
+run_cmd rm -rf ${CONDA_ROOT}/pkgs/bob*.tar.bz2
+
+# remove environments create by conda-build.
+run_cmd ${CONDA_ROOT}/bin/conda build purge
+
+# remove un-used cached conda packages (extracted directories in pkgs/) so that
+# builds take less space. This does not delete the tarballs.
+run_cmd ${CONDA_ROOT}/bin/conda clean --packages