diff --git a/etc/bashrc b/etc/bashrc
index 1417c75b4dc49f02edd5763715efd49221641272..f5a29a3d8955dadb95499df241c77c65ec8f0e47 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -101,7 +101,7 @@ export FOAM_SIGFPE=
 # The old dirs to be cleaned from the various environment variables
 # - remove anything under top-level directory.
 # NB: the WM_PROJECT_INST_DIR might not be identical between versions
-foamOldDirs="$FOAM_INST_DIR $HOME/$WM_PROJECT/$USER"
+foamOldDirs="$FOAM_INST_DIR $WM_PROJECT_SITE $HOME/$WM_PROJECT/$USER"
 if [ "$WM_PROJECT_INST_DIR" != "$FOAM_INST_DIR" ]
 then
     foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
diff --git a/etc/cshrc b/etc/cshrc
index 6fa63e47d1df2bd465ce18c13361028b8765a7a8..b932679ad06ffb912322ccc2d77d08db2e95edd4 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -107,6 +107,9 @@ if ( $?WM_PROJECT_INST_DIR ) then
         set foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
     endif
 endif
+if ( $?WM_PROJECT_SITE ) then
+    set foamOldDirs="$WM_PROJECT_SITE $foamOldDirs"
+endif
 
 
 # Location of installation