diff --git a/containers/jug/dev.Dockerfile b/containers/jug/dev.Dockerfile
index 193be431dba9c7234ccf680acb436677527b180f..d035a74324fdc5170d6c1318045541067955022d 100644
--- a/containers/jug/dev.Dockerfile
+++ b/containers/jug/dev.Dockerfile
@@ -56,6 +56,7 @@ if [ -n "${SPACK_CHERRYPICKS}" ] ; then
     fi
   done
 fi
+git -C $SPACK_ROOT gc --prune=all --aggressive
 sed -i 's/timeout=60/timeout=None/' $SPACK_ROOT/lib/spack/spack/stage.py
 ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash /usr/bin/docker-shell
 ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash /usr/bin/interactive-shell
@@ -255,9 +256,6 @@ WORKDIR /
 ## ========================================================================================
 FROM builder as staging
 
-# Garbage collect in git
-#RUN git -C $SPACK_ROOT gc --prune=all --aggressive
-
 ## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15
 ## See
 #https://askubuntu.com/questions/1034313/ubuntu-18-4-libqt5core-so-5-cannot-open-shared-object-file-no-such-file-or-dir