fMRIPrep: Can we delete the contents of work/fmriprep folder?

Realized that the contents of the work folder that fmriprep produces, is taking up large amounts of storage- Can we delete the contents for subjects that have run successfully? Like the fmriprep_wf and reportlets subfolders under work.
Thanks!

Yes. These are intermediate results and can be safely deleted at any point. The only cost is if you need to rerun, you can’t reuse those results.

I was wondering if there is a built-in flag to do this? I tried including “–clean-workdir”, but that seems clean up the directory before running fmriprep, instead of after (unless I’m misusing it)?

No, there isn’t. Adding such a feature seems like an opportunity for logic failures leading to unintended removals; if you’re confident you won’t need it, you can add && rm -rf $WORKDIR to the end of your command.

1 Like