Skip to content

Deleting all work directories, if they were not necesarry for the most recent pipeline run #4308

Closed Answered by bentsherman
photocyte asked this question in Q&A
Discussion options

You must be logged in to vote

As I understand it, you want to do something like:

  1. Run a pipeline
  2. Change a few things in the pipeline
  3. Resume the pipeline
  4. Automatically delete any task directories that were not cached by the resumed run

I don't think it would make sense for Nextflow to do this automatically, because it is common for a work directory to contain tasks from many different runs. But, I think you could do this yourself with the nextflow log command and some Bash.

nextflow log prints the list of all previous runs. nextflow log last by default prints the task directories of the most recent run. Using this command, you could then delete all task directories that aren't in that list. Then put all of that in a w…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@photocyte
Comment options

@bentsherman
Comment options

Answer selected by photocyte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants