From 21679c04e4d721f8631c700a260f71104650d6d4 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Sun, 20 Nov 2016 17:26:44 +0100
Subject: [PATCH] STYLE: adjust tutorial Allclean scripts (issue #310)

- A few without a 'cd' at the start.
  Several remove files that are already covered by the cleanCase function.
---
 tutorials/basic/laplacianFoam/flange/Allclean    |  3 +--
 tutorials/basic/potentialFoam/cylinder/Allclean  |  3 +--
 tutorials/basic/potentialFoam/pitzDaily/Allclean |  3 +--
 .../flamePropagationWithObstacles/Allclean       |  8 ++------
 tutorials/combustion/chemFoam/gri/Allclean       |  5 +++--
 tutorials/combustion/chemFoam/h2/Allclean        |  6 +++---
 tutorials/combustion/chemFoam/ic8h18/Allclean    |  6 +++---
 .../combustion/chemFoam/ic8h18_TDAC/Allclean     |  5 +++--
 .../chemFoam/ic8h18_TDAC/validation/createGraph  |  3 +--
 tutorials/combustion/chemFoam/nc7h16/Allclean    |  6 +++---
 .../combustion/engineFoam/kivaTest/Allclean      |  7 +++----
 .../rhoCentralFoam/biconic25-55Run35/Allclean    |  1 -
 .../rhoCentralFoam/shockTube/Allclean            |  4 +---
 .../annularThermalMixer/Allclean                 |  6 +++---
 .../rhoPimpleDyMFoam/annularThermalMixer/Allrun  |  2 +-
 .../laminar/helmholtzResonance/Allclean          |  4 ++++
 .../laminar/sineWaveDamping/Allclean             |  1 -
 .../angledDuct/explicit/Allclean                 |  4 ++--
 .../angledDuct/implicit/Allclean                 |  4 ++--
 .../sonicFoam/RAS/nacaAirfoil/Allclean           |  1 -
 .../sonicFoam/laminar/shockTube/Allclean         |  4 +---
 .../periodicCubeArgon/Allclean                   |  4 ++--
 .../periodicCubeWater/Allclean                   |  4 ++--
 .../molecularDynamics/mdFoam/nanoNozzle/Allclean |  3 +--
 .../buoyantSimpleFoam/buoyantCavity/Allclean     |  2 +-
 .../circuitBoardCooling/Allclean                 |  4 ++--
 .../externalCoupledMultiRegionHeater/Allclean    |  7 +++++--
 .../externalCoupledMultiRegionHeater/Allrun      |  4 +---
 .../externalCoupledMultiRegionHeater/Allrun.pre  |  3 +--
 .../externalSolarLoad/Allclean                   |  6 ++----
 .../chtMultiRegionFoam/externalSolarLoad/Allrun  |  4 +---
 .../externalSolarLoad/Allrun.pre                 |  4 +---
 .../multiRegionHeater/Allclean                   |  4 +++-
 .../snappyMultiRegionHeater/Allclean             |  7 ++++---
 .../windshieldCondensation/Allclean              |  6 ++++--
 .../windshieldDefrost/Allclean                   |  5 +++--
 .../heatExchanger/Allclean                       |  6 +++---
 .../multiRegionHeaterRadiation/Allclean          |  3 +--
 .../icoFoam/cavityMappingTest/Allclean           |  5 ++---
 tutorials/incompressible/icoFoam/elbow/Allclean  |  3 +--
 .../oscillatingInletACMI2D/Allclean              |  3 ++-
 .../pimpleDyMFoam/propeller/Allclean             | 13 +++++++------
 .../pimpleDyMFoam/propeller/Allrun.pre           |  2 ++
 .../pimpleDyMFoam/wingMotion/Allclean            |  4 +++-
 .../pimpleFoam/channel395DFSEM/Allrun            |  2 +-
 .../pimpleFoam/laminar/planarPoiseuille/Allclean |  2 +-
 .../pisoFoam/LES/motorBike/motorBike/Allclean    |  9 ++++-----
 .../angledDuct/explicit/Allclean                 |  4 ++--
 .../angledDuct/implicit/Allclean                 |  4 ++--
 .../straightDuctImplicit/Allclean                |  5 ++---
 tutorials/incompressible/simpleFoam/T3A/Allclean |  2 +-
 .../incompressible/simpleFoam/motorBike/Allclean | 14 ++++++++------
 .../simpleFoam/pipeCyclic/Allclean               |  3 +--
 .../incompressible/simpleFoam/rotorDisk/Allclean |  7 +++++--
 .../simpleFoam/turbineSiting/Allclean            |  3 +--
 .../simpleFoam/windAroundBuildings/Allclean      |  1 -
 tutorials/lagrangian/MPPICFoam/cyclone/Allclean  |  6 +++++-
 .../hopper/Allclean                              |  2 +-
 .../reactingParcelFilmFoam/cylinder/Allclean     |  2 +-
 .../reactingParcelFilmFoam/hotBoxes/Allclean     |  2 +-
 .../reactingParcelFilmFoam/rivuletPanel/Allclean |  2 +-
 .../reactingParcelFilmFoam/splashPanel/Allclean  |  2 +-
 .../reactingParcelFoam/filter/Allclean           |  4 +---
 .../reactingParcelFoam/verticalChannel/Allclean  |  4 +---
 .../verticalChannelLTS/Allclean                  |  6 +-----
 .../verticalChannel/Allclean                     |  4 +---
 .../verticalChannel/Allrun                       |  2 +-
 tutorials/mesh/foamyHexMesh/blob/Allclean        |  6 ++----
 tutorials/mesh/foamyHexMesh/flange/Allclean      |  8 ++++----
 tutorials/mesh/foamyHexMesh/mixerVessel/Allclean |  2 +-
 .../mesh/foamyHexMesh/simpleShapes/Allclean      | 15 ++++++---------
 tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean    |  9 ++++-----
 .../mesh/foamyQuadMesh/jaggedBoundary/Allclean   |  9 +++------
 tutorials/mesh/foamyQuadMesh/square/Allclean     |  9 +++------
 .../mesh/refineMesh/refineFieldDirs/Allclean     |  3 +--
 tutorials/mesh/snappyHexMesh/flange/Allclean     | 13 ++++++-------
 .../MPPICInterFoam/twoPhasePachuka/Allclean      |  2 +-
 .../MPPICInterFoam/twoPhasePachuka/Allrun        |  3 +--
 .../cavitatingFoam/LES/throttle/Allclean         |  4 ++--
 .../cavitatingFoam/LES/throttle3D/Allclean       |  6 +++---
 .../cavitatingFoam/RAS/throttle/Allclean         |  4 ++--
 .../laminar/depthCharge2D/Allclean               |  1 -
 .../laminar/depthCharge3D/Allclean               |  1 -
 .../laminar/damBreak4phase/Allclean              |  1 -
 .../multiphase/driftFluxFoam/RAS/tank3D/Allclean |  1 -
 .../multiphase/interDyMFoam/RAS/DTCHull/Allclean | 13 ++++++-------
 .../RAS/damBreakWithObstacle/Allclean            |  6 +++---
 .../interDyMFoam/RAS/floatingObject/Allclean     |  3 +--
 .../interDyMFoam/RAS/mixerVesselAMI/Allclean     |  2 +-
 .../interDyMFoam/RAS/motorBike/Allclean          | 16 ++++++++--------
 .../multiphase/interDyMFoam/RAS/motorBike/Allrun |  2 +-
 .../multiphase/interFoam/RAS/DTCHull/Allclean    | 14 +++++++-------
 .../interFoam/RAS/waterChannel/Allclean          |  4 +++-
 .../interFoam/RAS/weirOverflow/Allclean          |  6 ++++--
 .../interPhaseChangeDyMFoam/propeller/Allclean   | 11 ++++++-----
 .../interPhaseChangeDyMFoam/propeller/Allrun     |  2 ++
 .../interPhaseChangeDyMFoam/propeller/Allrun.pre |  2 ++
 .../cavitatingBullet/Allclean                    |  8 +++-----
 .../multiphaseEulerFoam/damBreak4phase/Allclean  |  1 -
 .../damBreak4phaseFine/Allclean                  |  1 -
 .../laminar/damBreak4phase/Allclean              |  1 -
 .../laminar/damBreak4phaseFine/Allclean          |  1 -
 .../oscillatingBox/Allclean                      |  5 +++--
 .../oscillatingBox/Allclean                      |  5 +++--
 .../twoLiquidMixingFoam/lockExchange/Allclean    |  1 -
 .../createZeroDirectory/cavity/Allclean          |  6 ++++--
 .../createZeroDirectory/motorBike/Allclean       | 14 ++++++++------
 .../createZeroDirectory/motorBike/Allrun         |  2 +-
 .../snappyMultiRegionHeater/Allclean             |  9 ++++-----
 .../snappyMultiRegionHeater/Allrun               |  3 +--
 110 files changed, 245 insertions(+), 274 deletions(-)

diff --git a/tutorials/basic/laplacianFoam/flange/Allclean b/tutorials/basic/laplacianFoam/flange/Allclean
index c9b3f9f8d41..dc38fab61fd 100755
--- a/tutorials/basic/laplacianFoam/flange/Allclean
+++ b/tutorials/basic/laplacianFoam/flange/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-rm -rf EnSight Ensight Fieldview > /dev/null 2>&1
-rm -f constant/polyMesh/boundary > /dev/null 2>&1
+rm -rf Fieldview > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/cylinder/Allclean b/tutorials/basic/potentialFoam/cylinder/Allclean
index 7db36b267cf..61edfb30323 100755
--- a/tutorials/basic/potentialFoam/cylinder/Allclean
+++ b/tutorials/basic/potentialFoam/cylinder/Allclean
@@ -4,8 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-\rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/pitzDaily/Allclean b/tutorials/basic/potentialFoam/pitzDaily/Allclean
index 5734444f4e7..61edfb30323 100755
--- a/tutorials/basic/potentialFoam/pitzDaily/Allclean
+++ b/tutorials/basic/potentialFoam/pitzDaily/Allclean
@@ -4,8 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
index bfa08cad4b3..189dd60ac40 100755
--- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
+++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
@@ -3,14 +3,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
 cleanCase
+rm -rf 0
 
 rm -rf VTK
-rm -rf 0
-rm -rf constant/polyMesh/sets constant/polyMesh/faces
-rm -rf constant/polyMesh/faces
-rm -rf constant/polyMesh/points
-rm -rf constant/polyMesh/owner
-rm -rf constant/polyMesh/neighbour
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/gri/Allclean b/tutorials/combustion/chemFoam/gri/Allclean
index a3d5bcf25f5..6d98f58208e 100755
--- a/tutorials/combustion/chemFoam/gri/Allclean
+++ b/tutorials/combustion/chemFoam/gri/Allclean
@@ -1,12 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
-rm -rf 0 chemFoam.out constant/reactions constant/thermo \
+rm -rf chemFoam.out constant/reactions constant/thermo \
    validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/h2/Allclean b/tutorials/combustion/chemFoam/h2/Allclean
index d511cde495b..5d4bbd8d845 100755
--- a/tutorials/combustion/chemFoam/h2/Allclean
+++ b/tutorials/combustion/chemFoam/h2/Allclean
@@ -1,12 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
-rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
+rm -rf chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
 #------------------------------------------------------------------------------
-
diff --git a/tutorials/combustion/chemFoam/ic8h18/Allclean b/tutorials/combustion/chemFoam/ic8h18/Allclean
index d511cde495b..5d4bbd8d845 100755
--- a/tutorials/combustion/chemFoam/ic8h18/Allclean
+++ b/tutorials/combustion/chemFoam/ic8h18/Allclean
@@ -1,12 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
-rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
+rm -rf chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
 #------------------------------------------------------------------------------
-
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allclean b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allclean
index 84cf4789e86..5d4bbd8d845 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allclean
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allclean
@@ -1,11 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
-rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
+rm -rf chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph b/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
index 9019192823e..d406960eff0 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
@@ -21,5 +21,4 @@ gnuplot<<EOF
         "chemkinII" with lines title "Chemkin II" lt -1
 EOF
 
-# ----------------------------------------------------------------- end-of-file
-
+# -----------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/nc7h16/Allclean b/tutorials/combustion/chemFoam/nc7h16/Allclean
index d511cde495b..5d4bbd8d845 100755
--- a/tutorials/combustion/chemFoam/nc7h16/Allclean
+++ b/tutorials/combustion/chemFoam/nc7h16/Allclean
@@ -1,12 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
-rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
+rm -rf chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
 #------------------------------------------------------------------------------
-
diff --git a/tutorials/combustion/engineFoam/kivaTest/Allclean b/tutorials/combustion/engineFoam/kivaTest/Allclean
index 6904a7f0e6a..b1fa019711a 100755
--- a/tutorials/combustion/engineFoam/kivaTest/Allclean
+++ b/tutorials/combustion/engineFoam/kivaTest/Allclean
@@ -5,11 +5,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 mv ./-180 temp180
-cleanCase
 
-rm -rf 0 > /dev/null 2>&1
-rm -f constant/polyMesh/boundary > /dev/null 2>&1
+cleanCase
+rm -rf 0
 
 mv temp180 ./-180
 
-#------------------------------------------------------------------------------
\ No newline at end of file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
index 91996c46bbe..a5e65c7d81b 100755
--- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
+++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
@@ -6,6 +6,5 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 cleanCase
 cleanSamples
-rm -rf constant/polyMesh/boundary
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/Allclean b/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
index 0e21e4a7f61..b6716d88fb7 100755
--- a/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
+++ b/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
@@ -4,10 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# Remove 0 directory - recreated from 0.orig
-\rm -rf 0
-
 cleanCase
 cleanSamples
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
index cc15617bf67..14de6e88627 100755
--- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
+++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf 0 > /dev/null 2>&1
-rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
+
+rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
index 07492af16c3..e7b28d6aa52 100755
--- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
+++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
@@ -9,7 +9,7 @@ runApplication surfaceFeatureExtract
 runApplication blockMesh
 runApplication snappyHexMesh -overwrite
 
-\rm -rf 0
+rm -rf 0
 
 runApplication createBaffles -overwrite
 runApplication mergeOrSplitBaffles -split -overwrite
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allclean b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allclean
index afc06ff982c..92ec2e3cea0 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allclean
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allclean
@@ -1,5 +1,7 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
@@ -7,3 +9,5 @@ cleanCase
 (cd system && rm -f blockMeshDict.caseBlocks blockMeshDict.caseBoundary)
 
 rm -rf resolved modelled pressure.eps
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allclean b/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allclean
index ad2d4ecb971..6b45f82a41b 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allclean
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allclean
@@ -6,5 +6,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 cleanCase
 
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean
index 97591ced329..7b7e1442f81 100755
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 # Remove copies of common files
 \rm -rf 0 constant
 
-cleanCase
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean
index 97591ced329..7b7e1442f81 100755
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 # Remove copies of common files
 \rm -rf 0 constant
 
-cleanCase
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean
index d1c82b1a7c0..1deb2091334 100755
--- a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean
+++ b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-rm -f constant/polyMesh/boundary   > /dev/null 2>&1
 
 # Don't need these extra files (from star4ToFoam conversion)
 rm -f \
diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean b/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
index ea06ee44e4a..b6716d88fb7 100755
--- a/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
+++ b/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
@@ -4,10 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# Remove 0.orig/ copy
-\rm -rf 0
-
 cleanCase
 cleanSamples
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean
index 9852503f2cb..194c42b8c62 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean
@@ -4,11 +4,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 rm -rf 0/lagrangian 0/uniform
 rm -f Ar-Ar
 rm -f electrostatic
 rm -f constant/idList
-rm -rf constant/polyMesh/sets
-cleanCase
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean
index ec56cfe28b5..d52fe88c714 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean
@@ -4,11 +4,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 rm -rf 0/lagrangian 0/uniform
 rm -f O-O
 rm -f electrostatic
 rm -f constant/idList
-rm -rf constant/polyMesh/sets
-cleanCase
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
index 21cb83d5ac4..7fa5428f73e 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
+++ b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
@@ -4,8 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf constant/polyMesh/sets
-rm -rf processor[0-9]
 cleanCase
+rm -rf processor[0-9]
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
index bb7f5888ae2..f02ac1a6eb2 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
@@ -1,7 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
index eabb05d8f40..eb1e8dba18a 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
@@ -5,8 +5,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-rm -rf constant/baffle3DRegion
-rm -rf constant/polyMesh/boundary
 rm -rf 0
 
+rm -rf constant/baffle3DRegion
+
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean
index 82e538bb437..757a0f3d6cc 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean
@@ -5,19 +5,22 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+
 rm -rf comms
 rm -rf VTK
-rm -rf constant/cellToRegion constant/polyMesh/sets
+rm -rf constant/cellToRegion
+
 rm -rf 0/bottomWater
 rm -rf 0/topAir
 rm -rf 0/heater
 rm -rf 0/leftSolid
 rm -rf 0/rightSolid
 rm -f 0/cellToRegion
+
 rm -rf constant/bottomWater/polyMesh
 rm -rf constant/topAir/polyMesh
 rm -rf constant/heater/polyMesh
 rm -rf constant/leftSolid/polyMesh
 rm -rf constant/rightSolid/polyMesh
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
index e6c35cda767..0a12ee44a70 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -30,5 +29,4 @@ runApplication ./externalSolver
 # Reconstruct
 runApplication reconstructPar -allRegions
 
-
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre
index f6fd2f3950d..481deedc7be 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -30,4 +29,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll 2>/dev/null
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
index c90b8ceb135..4d24110e3a5 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
@@ -7,7 +7,7 @@ cd ${0%/*} || exit 1    # run from this directory
 cleanCase
 
 rm -rf VTK
-rm -rf constant/cellToRegion constant/polyMesh/sets
+rm -rf constant/cellToRegion
 
 rm -rf constant/air/polyMesh
 rm -rf constant/solid/polyMesh
@@ -28,6 +28,4 @@ rm -f 0/floor/cellToRegion
 rm -f 0/solid/cellToRegion
 rm -f 0/cellToRegion
 
-
-
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
index 225acd829ff..4ab71d56f14 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
@@ -1,11 +1,9 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-
 # Setup case
 ./Allrun.pre
 
@@ -31,4 +29,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
index 59a0bb8730b..9ab5e3c25a3 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -25,5 +24,4 @@ do
     changeDictionary -region $i > log.changeDictionary.$i 2>&1
 done
 
-
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
index d615a28f98f..8b0c932d51b 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
@@ -5,14 +5,16 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+
 rm -rf VTK
-rm -rf constant/cellToRegion constant/polyMesh/sets
+rm -rf constant/cellToRegion
 rm -f 0/cellToRegion
 rm -rf 0/bottomWater
 rm -rf 0/topAir
 rm -rf 0/heater
 rm -rf 0/leftSolid
 rm -rf 0/rightSolid
+
 rm -rf constant/bottomWater/polyMesh
 rm -rf constant/topAir/polyMesh
 rm -rf constant/heater/polyMesh
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
index f56be82da79..230730502d4 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
@@ -4,19 +4,20 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
-rm -f constant/polyMesh/boundary
 
-cleanCase
 rm -rf VTK
-rm -rf constant/cellToRegion constant/polyMesh/sets
+rm -rf constant/cellToRegion
 rm -rf 0/bottomAir
 rm -rf 0/topAir
 rm -rf 0/heater
 rm -rf 0/leftSolid
 rm -rf 0/rightSolid
 rm -f 0/cellToRegion
+
 rm -rf constant/bottomAir/polyMesh
 rm -rf constant/topAir/polyMesh
 rm -rf constant/heater/polyMesh
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allclean
index 734eec89e40..c34834dedb6 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allclean
@@ -1,11 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
+
 rm -rf constant/windshield/polyMesh
 rm -rf constant/cabin/polyMesh
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allclean
index b484aeff526..92a631d049e 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allclean
@@ -1,13 +1,14 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 
 rm -rf constant/exterior/polyMesh
 rm -rf constant/ice/polyMesh
 rm -rf constant/cabin/polyMesh
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allclean b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allclean
index 0cfcbc5894d..5a54eef9a0e 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allclean
@@ -1,15 +1,15 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
 foamCleanPolyMesh -region air
 foamCleanPolyMesh -region porous
 
 rm -f *.OpenFOAM
 
-rm -rf 0
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
index e440375b6a9..0df7ec62070 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
@@ -6,7 +6,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 cleanCase
 rm -rf VTK
-rm -rf constant/cellToRegion constant/polyMesh/sets
+rm -rf constant/cellToRegion
 rm -rf 0/bottomAir
 rm -rf 0/topAir
 rm -rf 0/heater
@@ -28,7 +28,6 @@ rm -f constant/bottomAir/subMap
 rm -f constant/bottomAir/visibleFaceFaces
 rm -f constant/bottomAir/mapDist
 
-
 rm -f constant/topAir/F
 rm -f constant/topAir/constructMap*
 rm -f constant/topAir/finalAgglom
diff --git a/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean b/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
index 0280fc46544..b5eb7e0aafa 100755
--- a/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
+++ b/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
@@ -1,11 +1,10 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf constant/coarseMesh
 
-
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/elbow/Allclean b/tutorials/incompressible/icoFoam/elbow/Allclean
index f2da619e3dc..400ad856874 100755
--- a/tutorials/incompressible/icoFoam/elbow/Allclean
+++ b/tutorials/incompressible/icoFoam/elbow/Allclean
@@ -4,8 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -f constant/polyMesh/boundary > /dev/null 2>&1
-rm -rf fluentInterface
 cleanCase
+rm -rf fluentInterface
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean
index 4496e60747e..61edfb30323 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean
@@ -5,5 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allclean b/tutorials/incompressible/pimpleDyMFoam/propeller/Allclean
index 496837c14e3..2334d531d33 100755
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allclean
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allclean
@@ -4,11 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface
-rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
+
+# Remove surfaces and features
+rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
+rm -f constant/triSurface/*.eMesh*            > /dev/null 2>&1
+rm -rf constant/extendedFeatureEdgeMesh       > /dev/null 2>&1
 
-rm -rf 0 > /dev/null 2>&1
-rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
-rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre
index 6bb6affbfdc..fd9adacb88d 100755
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre
@@ -29,3 +29,5 @@ runApplication createPatch -overwrite
 
 # - set the initial fields
 restore0Dir
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allclean b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allclean
index d01b222a10e..ae51d1251b2 100755
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allclean
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allclean
@@ -1,7 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 (
@@ -20,3 +20,5 @@ cd ${0%/*} || exit 1    # Run from this directory
     cleanCase
     rm -rf 0
 )
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/channel395DFSEM/Allrun b/tutorials/incompressible/pimpleFoam/channel395DFSEM/Allrun
index 2ba4fbfe420..f9a700b1f01 100755
--- a/tutorials/incompressible/pimpleFoam/channel395DFSEM/Allrun
+++ b/tutorials/incompressible/pimpleFoam/channel395DFSEM/Allrun
@@ -17,4 +17,4 @@ runApplication decomposePar -cellDist
 runParallel $application
 #runApplication reconstructPar -latestTime
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allclean b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allclean
index 0f2f7ba75f3..78739484071 100755
--- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allclean
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allclean
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-rm -rf postProcessing *.dat validation/*.eps
+rm -rf *.dat validation/*.eps
 
 wclean validation/WatersKing
 
diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allclean b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allclean
index 32ab17201f0..da3e9263331 100755
--- a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allclean
+++ b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allclean
@@ -4,12 +4,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface
-rm -f constant/triSurface/motorBike.obj.gz
-
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
+
+# Remove surface
+rm -f constant/triSurface/motorBike.obj.gz
 
 # Reset decomposeParDict
 cp system/decomposeParDict.hierarchical system/decomposeParDict
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean
index 97591ced329..7b7e1442f81 100755
--- a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 # Remove copies of common files
 \rm -rf 0 constant
 
-cleanCase
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean
index 97591ced329..7b7e1442f81 100755
--- a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 # Remove copies of common files
 \rm -rf 0 constant
 
-cleanCase
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
index f7e384215e4..4ebf8a1a7ff 100755
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
@@ -4,11 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 rm *.obj > /dev/null 2>&1
 rm -r constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm constant/triSurface/boundaryAndFaceZones.eMesh > /dev/null 2>&1
-rm constant/polyMesh/boundary > /dev/null 2>&1
-
-cleanCase
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/T3A/Allclean b/tutorials/incompressible/simpleFoam/T3A/Allclean
index bb7f5888ae2..f02ac1a6eb2 100755
--- a/tutorials/incompressible/simpleFoam/T3A/Allclean
+++ b/tutorials/incompressible/simpleFoam/T3A/Allclean
@@ -1,7 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allclean b/tutorials/incompressible/simpleFoam/motorBike/Allclean
index 68a1d17d7b9..959198cb951 100755
--- a/tutorials/incompressible/simpleFoam/motorBike/Allclean
+++ b/tutorials/incompressible/simpleFoam/motorBike/Allclean
@@ -1,13 +1,15 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface and features
-rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
-rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
-rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
+cleanCase
+rm -rf 0
 
-rm -rf 0 > /dev/null 2>&1
+# Remove surface and features
+rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
+rm -f constant/triSurface/motorBike.eMesh  > /dev/null 2>&1
+rm -rf constant/extendedFeatureEdgeMesh    > /dev/null 2>&1
 
-cleanCase
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean b/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
index 5734444f4e7..61edfb30323 100755
--- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
+++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
@@ -4,8 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
index 2204732e451..f68257aae3e 100755
--- a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
+++ b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
@@ -1,13 +1,16 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface and features
+cleanCase
+
+# Remove surface and features
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -f constant/triSurface/rotatingZone.eMesh > /dev/null 2>&1
 rm -f constant/triSurface/fixed.eMesh > /dev/null 2>&1
 rm -f 0/pointLevel > /dev/null 2>&1
 rm -f 0/cellLevel > /dev/null 2>&1
 
-cleanCase
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/Allclean b/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
index aae8b75f800..abf6e2e700e 100755
--- a/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
@@ -4,9 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
 
 # Remove decomposeParDict
 rm -f system/decomposeParDict
diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
index baa135b1d4b..03ba09eaba0 100755
--- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
+++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
@@ -8,6 +8,5 @@ cleanCase
 
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -f constant/triSurface/buildings.eMesh > /dev/null 2>&1
-rm -f constant/polyMesh/boundary > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/Allclean b/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
index 2f40581670e..e7a7ea76ade 100755
--- a/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
+++ b/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
@@ -1,7 +1,11 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
 
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 # rm -f constant/triSurface/cyclone.stl.gz > /dev/null 2>&1
 
-cleanCase
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
index 85527724bf1..47cedce61ea 100755
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
@@ -1,7 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 (
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
index 77256434358..4d36bb740b1 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
@@ -5,9 +5,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
 rm -rf constant/wallFilmRegion
-rm -rf 0
 rm -f *.obj
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allclean
index db954577452..6ed9b627a76 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allclean
@@ -5,10 +5,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
 rm -rf system/wallFilmRegion
 rm -rf constant/wallFilmRegion
-rm -rf 0
 rm -f *.obj
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allclean
index 77256434358..4d36bb740b1 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allclean
@@ -5,9 +5,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
 rm -rf constant/wallFilmRegion
-rm -rf 0
 rm -f *.obj
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
index 77256434358..4d36bb740b1 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
@@ -5,9 +5,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
+rm -rf 0
 
 rm -rf constant/wallFilmRegion
-rm -rf 0
 rm -f *.obj
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/Allclean b/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
index 7e7333f78c3..61edfb30323 100755
--- a/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# Remove 0.orig/ copy and post-processing directories
-\rm -rf 0 postProcessing
-
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
index df77730bc36..61edfb30323 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove old time and post-processing directories
-rm -rf 0 *[1-9]* processor* postProcessing
-
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
index 08f70e11b9b..61edfb30323 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
@@ -4,11 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove old time and post-processing directories
-rm -rf 0 *[1-9]* processor* postProcessing
-
-# copy 0.orig to 0
-cp -r 0.orig 0
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
index 6a56bbcf58b..61edfb30323 100755
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# Remove old time, 0.orig/ copy and post-processing directories
-\rm -rf 0 *[1-9]* processor* postProcessing
-
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
index a4698df1e26..6be8a205163 100755
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
@@ -10,7 +10,7 @@ runApplication blockMesh
 
 runApplication potentialFoam
 
-# remove incompatible (volumetric) flux field
+# Remove incompatible (volumetric) flux field
 \rm -f 0/phi 2>/dev/null
 
 runApplication $(getApplication)
diff --git a/tutorials/mesh/foamyHexMesh/blob/Allclean b/tutorials/mesh/foamyHexMesh/blob/Allclean
index 7563c7a99b4..f4dcb53f51a 100755
--- a/tutorials/mesh/foamyHexMesh/blob/Allclean
+++ b/tutorials/mesh/foamyHexMesh/blob/Allclean
@@ -1,12 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
-rm -rf 0 > /dev/null 2>&1
+rm -rf 0
 
 rm -rf constant/triSurface/blob.stl.gz > /dev/null 2>&1
 
@@ -23,5 +22,4 @@ rm -rf constant/backgroundMeshDecomposition/polyMesh/points > /dev/null 2>&1
 rm -rf snapToSurface?.obj > /dev/null 2>&1
 rm -rf tetsToSnapTo.obj > /dev/null 2>&1
 
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/flange/Allclean b/tutorials/mesh/foamyHexMesh/flange/Allclean
index 2ceecfe1f9a..75abafd12bb 100755
--- a/tutorials/mesh/foamyHexMesh/flange/Allclean
+++ b/tutorials/mesh/foamyHexMesh/flange/Allclean
@@ -1,15 +1,17 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+rm -rf 0
+
 rm -r constant/triSurface/flange.stl.gz > /dev/null 2>&1
 
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -r constant/ccx constant/ccy constant/ccz > /dev/null 2>&1
 rm -r constant/internalDelaunayVertices constant/targetCellSize > /dev/null 2>&1
-rm -r 0 > /dev/null 2>&1
 
 rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1
 rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1
@@ -19,6 +21,4 @@ rm -rf constant/backgroundMeshDecomposition/polyMesh/points > /dev/null 2>&1
 
 rm -r *.obj > /dev/null 2>&1
 
-cleanCase
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean b/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
index d7ffd378fae..afee03547e3 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
@@ -5,8 +5,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
+
 rm -rf constant/extendedFeatureEdgeMesh/
 rm -f constant/triSurface/*.eMesh*
 rm -f constant/triSurface/*.stl
diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
index 66229e46ca5..5ef122ebb30 100755
--- a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
+++ b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
@@ -1,22 +1,19 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+rm -rf 0
+
 rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices > /dev/null 2>&1
-rm constant/triSurface/*.eMesh > /dev/null 2>&1
-rm constant/triSurface/*_orient* > /dev/null 2>&1
-rm -r constant/polyMesh > /dev/null 2>&1
-rm -r constant/polyMesh > /dev/null 2>&1
+rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
+rm -f constant/triSurface/*_orient* > /dev/null 2>&1
 rm -r constant/tetDualMesh > /dev/null 2>&1
 
 rm -r snapToSurface?.obj tetsToSnapTo.obj > /dev/null 2>&1
 
 rm domain coneAndSphere > /dev/null 2>&1
 
-rm -rf 0/
-
-cleanCase
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
index ab8099c6497..894a75c4e03 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
@@ -1,15 +1,14 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+rm -rf 0
+
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -rf constant/triSurface/*.eMesh > /dev/null 2>&1
-rm -rf 0 > /dev/null 2>&1
 rm -rf MeshedSurface.obj > /dev/null 2>&1
 
-cleanCase
-
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
index 3a0c2229939..1048413963c 100755
--- a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
@@ -1,16 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -rf constant/triSurface/jaggedBoundary.eMesh > /dev/null 2>&1
-rm -rf constant/polyMesh > /dev/null 2>&1
-
 rm -rf MeshedSurface.obj > /dev/null 2>&1
 
-cleanCase
-
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/square/Allclean b/tutorials/mesh/foamyQuadMesh/square/Allclean
index d8936babb01..8da713f31dc 100755
--- a/tutorials/mesh/foamyQuadMesh/square/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/square/Allclean
@@ -1,16 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -rf constant/triSurface/unit_cube.eMesh > /dev/null 2>&1
-rm -rf constant/polyMesh > /dev/null 2>&1
-
 rm -rf MeshedSurface*.obj > /dev/null 2>&1
 
-cleanCase
-
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/Allclean b/tutorials/mesh/refineMesh/refineFieldDirs/Allclean
index 5734444f4e7..61edfb30323 100755
--- a/tutorials/mesh/refineMesh/refineFieldDirs/Allclean
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/Allclean
@@ -4,8 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/snappyHexMesh/flange/Allclean b/tutorials/mesh/snappyHexMesh/flange/Allclean
index eba9b7e6d2a..e46b494f7bf 100755
--- a/tutorials/mesh/snappyHexMesh/flange/Allclean
+++ b/tutorials/mesh/snappyHexMesh/flange/Allclean
@@ -4,15 +4,14 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface
-rm -f constant/triSurface/flange.stl.gz
+cleanCase
+rm -rf 0
 
-rm -rf 0 > /dev/null 2>&1
 rm -f ./flange ./*.obj > /dev/null 2>&1
-rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
-rm -f constant/triSurface/flange.eMesh > /dev/null 2>&1
-rm -f constant/polyMesh/boundary
 
-cleanCase
+# Remove surface and features
+rm -f constant/triSurface/flange.stl.gz > /dev/null 2>&1
+rm -f constant/triSurface/flange.eMesh  > /dev/null 2>&1
+rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allclean b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allclean
index 9cbb0c1a827..eb6c79aa663 100755
--- a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allclean
+++ b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allclean
@@ -9,4 +9,4 @@ cleanCase
 rm -f system/blockMeshDict
 rm -f 0/alpha.water
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
index b5139052585..18e8f4ad3a6 100755
--- a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
+++ b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
@@ -4,7 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-
 # Set application name
 application=$(getApplication)
 
@@ -33,4 +32,4 @@ runParallel $(getApplication)
 # Reconstruct case
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean
index 57c93208bcd..6bb45f9da9b 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf constant/polyMesh/sets > /dev/null 2>&1
+cleanCase
+
 rm -rf 0/polyMesh > /dev/null 2>&1
 rm system/topoSetDict > /dev/null 2>&1
-cleanCase
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean
index d1fd91d5d36..8b8b96fa046 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean
@@ -4,10 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf constant/polyMesh/sets > /dev/null 2>&1
-rm -rf 0 > /dev/null 2>&1
+cleanCase
+rm -rf 0
+
 rm system/topoSetDict > /dev/null 2>&1
 rm -rf processor[0-9] > /dev/null 2>&1
-cleanCase
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean
index 57c93208bcd..6bb45f9da9b 100755
--- a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf constant/polyMesh/sets > /dev/null 2>&1
+cleanCase
+
 rm -rf 0/polyMesh > /dev/null 2>&1
 rm system/topoSetDict > /dev/null 2>&1
-cleanCase
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
index 9f691c93851..61edfb30323 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
index a180eaa28b0..86d93673831 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 rm -rf processor*
 
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
index 9f691c93851..61edfb30323 100755
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean
index c89fe3143ec..5558bc15964 100755
--- a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean
+++ b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean
@@ -2,7 +2,6 @@
 cd ${0%/*} || exit 1    # Run from this directory
 
 # Clean time directories only
-
 rm -rf *[1-9]*
 rm -f log.* 2>/dev/null
 
diff --git a/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allclean b/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allclean
index e3e304dace9..a0aed574d06 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allclean
@@ -4,14 +4,13 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface
-rm -f constant/triSurface/DTC-scaled.stl.gz > /dev/null 2>&1
-rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
-rm -f constant/triSurface/DTC-scaled.eMesh > /dev/null 2>&1
-
 cleanCase
-rm constant/polyMesh/boundary > /dev/null 2>&1
-rm -rf 0 > /dev/null 2>&1
+rm -rf 0
 rm system/topoSetDict > /dev/null 2>&1
 
+# Remove surface and features
+rm -f constant/triSurface/DTC-scaled.stl.gz > /dev/null 2>&1
+rm -f constant/triSurface/DTC-scaled.eMesh  > /dev/null 2>&1
+rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
+
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/damBreakWithObstacle/Allclean b/tutorials/multiphase/interDyMFoam/RAS/damBreakWithObstacle/Allclean
index d1295e344e2..c9e8210d778 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/damBreakWithObstacle/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/damBreakWithObstacle/Allclean
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm system/cellSetDict > /dev/null 2>&1
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
+
+rm system/cellSetDict > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allclean b/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allclean
index 5734444f4e7..61edfb30323 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allclean
@@ -4,8 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allclean b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allclean
index 83230a683ee..d3b4c4257f3 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allclean
@@ -5,8 +5,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0 > /dev/null 2>&1
+
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
 
diff --git a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
index 9a3f86fc055..29141d9f9ba 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
@@ -1,17 +1,17 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface and features
-\rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
-\rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
-\rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
-
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
 
-\rm -f constant/polyMesh/boundary
+# Remove surface and features
+\rm -f  constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
+\rm -f  constant/triSurface/motorBike.eMesh  > /dev/null 2>&1
+\rm -rf constant/extendedFeatureEdgeMesh     > /dev/null 2>&1
 
 \cp system/controlDict_run system/controlDict
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
index 776643da4d5..8c8ea78f795 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
+++ b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
@@ -17,4 +17,4 @@ runParallel -s decompose redistributePar -decompose -latestTime
 runParallel -s restart $(getApplication)
 
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean b/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean
index e3e304dace9..0086cd47cb0 100755
--- a/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean
@@ -4,14 +4,14 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface
-rm -f constant/triSurface/DTC-scaled.stl.gz > /dev/null 2>&1
-rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
-rm -f constant/triSurface/DTC-scaled.eMesh > /dev/null 2>&1
-
 cleanCase
-rm constant/polyMesh/boundary > /dev/null 2>&1
-rm -rf 0 > /dev/null 2>&1
+rm -rf 0
+
 rm system/topoSetDict > /dev/null 2>&1
 
+# Remove surfaces and features
+rm -f  constant/triSurface/DTC-scaled.stl.gz > /dev/null 2>&1
+rm -f  constant/triSurface/DTC-scaled.eMesh  > /dev/null 2>&1
+rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
+
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean b/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean
index ac0e3978c25..e67e3024e88 100755
--- a/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean
@@ -4,7 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+
 rm 0/alpha.water.gz 0/alpha.water 2>/dev/null
 rm -rf *Flux
 
-cleanCase
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/weirOverflow/Allclean b/tutorials/multiphase/interFoam/RAS/weirOverflow/Allclean
index 2c5a008802e..61edfb30323 100755
--- a/tutorials/multiphase/interFoam/RAS/weirOverflow/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/weirOverflow/Allclean
@@ -1,8 +1,10 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean
index 496837c14e3..af5bf72167e 100755
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean
@@ -4,11 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface
-rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
-
 cleanCase
-
 rm -rf 0 > /dev/null 2>&1
-rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
+
+# Remove surface
+rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
 rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
+rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
index 3f7cab5d82e..59aa02e7533 100755
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
@@ -11,3 +11,5 @@ runApplication decomposePar
 runParallel $(getApplication)
 
 runApplication reconstructPar
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
index b62fc66a8c6..b9980dd726d 100755
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
@@ -36,3 +36,5 @@ runApplication createPatch -overwrite
 # - apply the initial fields
 
 restore0Dir
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
index 42c58bf0eb3..05fe1e79a3f 100755
--- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
+++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
@@ -4,12 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+rm -rf 0
+
 # Remove surface
 rm -f constant/triSurface/bullet.stl.gz
 
-# Remove 0.orig/ copy
-\rm -rf 0
-
-cleanCase
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
index 9f691c93851..61edfb30323 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
index 9f691c93851..61edfb30323 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
index 9f691c93851..61edfb30323 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
index 9f691c93851..61edfb30323 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean
index a0dbe45d86f..5b172378266 100755
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean
@@ -1,10 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 rm -rf poolHeight poolHeight_vs_time
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean
index a0dbe45d86f..5b172378266 100755
--- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean
+++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean
@@ -1,10 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-# Source tutorial run functions
+# Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 rm -rf poolHeight poolHeight_vs_time
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
index 9f691c93851..61edfb30323 100755
--- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
+++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
@@ -5,7 +5,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
 cleanCase
-
 rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/Allclean b/tutorials/preProcessing/createZeroDirectory/cavity/Allclean
index 2c5a008802e..61edfb30323 100755
--- a/tutorials/preProcessing/createZeroDirectory/cavity/Allclean
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/Allclean
@@ -1,8 +1,10 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-rm -rf 0 > /dev/null 2>&1
-
 cleanCase
+rm -rf 0
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean b/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean
index 17464e7020d..7ba7ddabb3e 100755
--- a/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean
+++ b/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean
@@ -1,13 +1,15 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-# remove surface and features
-\rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
-\rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
-\rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
+cleanCase
+rm -rf 0
 
-rm -rf 0 > /dev/null 2>&1
+# Remove surface and features
+\rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
+\rm -f constant/triSurface/motorBike.eMesh  > /dev/null 2>&1
+\rm -rf constant/extendedFeatureEdgeMesh    > /dev/null 2>&1
 
-cleanCase
+#------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun b/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
index 4ca1ac1c297..dbb00a2dbb2 100755
--- a/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
@@ -22,4 +22,4 @@ runParallel $(getApplication)
 runApplication reconstructParMesh -constant
 runApplication reconstructPar -latestTime
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
index 44f1fb098f5..18b6490f109 100755
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
@@ -4,18 +4,17 @@ cd ${0%/*} || exit 1    # run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
+cleanCase
+rm -rf 0
+
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
-rm -f constant/polyMesh/boundary
 
-cleanCase
 rm -rf VTK
-rm -rf constant/cellToRegion constant/polyMesh/sets
-rm -rf 0
 rm -rf constant/bottomAir/polyMesh
 rm -rf constant/topAir/polyMesh
 rm -rf constant/heater/polyMesh
 rm -rf constant/leftSolid/polyMesh
 rm -rf constant/rightSolid/polyMesh
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
index 56e9b1ea901..fded3a87586 100755
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -36,4 +35,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
-- 
GitLab