One other big file that could be deleted is the res4d.nii.gz within the stats directory in each *.feat directory (higher level or first level). This is just the residuals and the only data files that are really needed from level to the next are the cope*.nii.gz and the varcope*.nii.gz files in the stats directory.
With Rich's code, this would like like this if you've already ran your jobs:
cd $FSL_Output_Dir_to_clean # eg, Level 1, 2, or 3
find . -name res4d.nii.gz -exec rm -f {} \;
find . -name filtered_func_data.nii.gz -exec rm -f {} \;
find . -name var_filtered_func_data.nii.gz -exec rm -f {} \;
And if you're running your jobs, it would like this:
(REALOUTPUT should be the output of your analysis, which will end in either ".feat" or ".gfeat")
#FIRST LEVEL
feat ${MAINOUTPUT}/FEAT_0${run}.fsf
cd ${REALOUTPUT}
rm -f filtered_func_data.nii.gz
rm -f stats/res4d.nii.gz
#SECOND LEVEL
feat ${MAINDIR2}/2ndLvlFixed_${SUBJ}.fsf
cd $REALOUTPUT
for j in `seq 22`; do #replace the 22 with the number of copes you have at the second level. you might also be able to do this with simple wildcard (*)
COPE=cope${j}.feat
cd $COPE
rm -f filtered_func_data.nii.gz
rm -f var_filtered_func_data.nii.gz
rm -f stats/res4d.nii.gz
cd ..
done
#THIRD LEVEL
feat ${ANALYZED}/3rdLvl_${RUN}_${CON_NAME}.fsf
cd $REALOUTPUT
cd cope1.feat
rm -f filtered_func_data.nii.gz
rm -f var_filtered_func_data.nii.gz
rm -f stats/res4d.nii.gz