# Does -resume re-run tasks if input files are deleted from the work directory?

**URL:** <https://community.seqera.io/t/does-resume-re-run-tasks-if-input-files-are-deleted-from-the-work-directory/2584>\
**Category:** Ask for help\
**Tags:** nextflow\
**Created:** [February 20, 2026, 3:33pm UTC](https://community.seqera.io/t/does-resume-re-run-tasks-if-input-files-are-deleted-from-the-work-directory/2584 "2026-02-20T15:33:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![perla\_elahmad](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/perla_elahmad/32/2339_2.png) [@perla\_elahmad](https://community.seqera.io/u/perla_elahmad)\
**Post date:** [February 20, 2026, 3:33pm UTC](https://community.seqera.io/t/does-resume-re-run-tasks-if-input-files-are-deleted-from-the-work-directory/2584/1 "2026-02-20T15:33:02Z")

</div>

I’m running a Nextflow pipeline on 191 samples (trim → bismark align → deduplicate → methylation extraction) and have hit my HPC storage limit. The trimmed FASTQs in my work directory are taking up ~3-4TB.

125 of my samples have already completed bismark alignment. Since all downstream steps use the BAM files, the trimmed FASTQs are no longer needed as inputs to any future process.

If I delete the trimmed FASTQs for those 125 completed samples and resume with `-resume`, will Nextflow re-run trimming?

Thank you!

---

<div class="post-metadata">

**Author:** ![ewels](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/ewels/32/1_2.png) [@ewels](https://community.seqera.io/u/ewels)\
**Post date:** [February 20, 2026, 4:04pm UTC](https://community.seqera.io/t/does-resume-re-run-tasks-if-input-files-are-deleted-from-the-work-directory/2584/2 "2026-02-20T16:04:22Z")

</div>

Short answer I’m afraid: yes.

That’s just how Nextflow handles cache + resume. It runs _the entire pipeline_ every time and checks every task that needs to be run and looks to see if it can find a cached version. If it can’t, it re-runs it - and every downstream task.

---

<div class="post-metadata">

**Author:** ![yinshiyi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/yinshiyi/32/1091_2.png) [@yinshiyi](https://community.seqera.io/u/yinshiyi)\
**Post date:** [February 20, 2026, 6:32pm UTC](https://community.seqera.io/t/does-resume-re-run-tasks-if-input-files-are-deleted-from-the-work-directory/2584/3 "2026-02-20T18:32:08Z")

</div>

for low storage nextflow run, perhaps this plugin could help you

> **[GitHub - bentsherman/nf-boost: Experimental features for Nextflow](https://github.com/bentsherman/nf-boost)**
>
> Experimental features for Nextflow

```groovy
plugins {
  id 'nf-boost'
}

boost {
  cleanup = true
}

```

I find it does cleanup more aggressively than regular `cleanup = true`. It seems to do clean up as the pipeline is running, once it determines a file is no longer needed for downstream process, it delete it.

---

<div class="post-metadata">

**Author:** ![ewels](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/ewels/32/1_2.png) [@ewels](https://community.seqera.io/u/ewels)\
**Post date:** [February 20, 2026, 8:12pm UTC](https://community.seqera.io/t/does-resume-re-run-tasks-if-input-files-are-deleted-from-the-work-directory/2584/4 "2026-02-20T20:12:52Z")

</div>

Yup, that’s exactly what it does. But it also breaks `-resume`. So I’m not sure that it’ll help here.

Generally if you have more samples than you have space for with intermediate files, your options are:

- Split into batches and run separate Nextflow jobs for each, sequentially. Cleaning up intermediate files after each run.
- Run Nextflow with some variation of `scratch` usage
  - Just enabling it can help, as only named `output` files will be copied back to the work directory from the node
  - You can run independent batches on a single node using `executor: local`, submitting the entire Nextflow pipeline run as a single HPC job. Set the `work/` directory to the node’s scratch dir and save the final results to networked storage.

Hope that helps!
