diff --git a/prep_code.sh b/prep_code.sh
index 2ddfee66cc55c905c9414dd9c1a5ba573ada7e88..5b39b92a83073ce4132f8091e70d92100664013d 100755
--- a/prep_code.sh
+++ b/prep_code.sh
@@ -172,6 +172,7 @@ if [ -n "${mnh_expand_options-}" ]; then
       rm -f $1_EXPAND
       $PHYEXTOOLSDIR/correct_indent.py tempo_mnh_expand "indent"
       mv tempo_mnh_expand_CORRECT_INDENT $1
+      rm -f tempo_mnh_expand
     fi
   }
   if [ -n "${model-}" ]; then