# The intermediate output file still exists

**URL:** <https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940>\
**Category:** usegalaxy.eu support\
**Tags:** workflow\
**Created:** [March 16, 2024, 9:59am UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940 "2024-03-16T09:59:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenqiang](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@chenqiang](https://help.galaxyproject.org/u/chenqiang)\
**Post date:** [March 16, 2024, 9:59am UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/1 "2024-03-16T09:59:25Z")

</div>

Hi，I saw the Output cleanup option ：Upon completion of this step, delete unchecked outputs from completed workflow steps if they are no longer required as inputs. **And I chose yes**.However, the output file generated in the trim step of my workflow still exists, and my memory is full. And I chose yes from beginning to end in Output cleanup.The intermediate output file still exists. **I hope that these process files don’t exist, otherwise my memory is far from enough**.

 ![9e728bdb9995dc35f790a45a57d1a3f](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/8/8d3d36b26a31189af3dd2f3ca4df07fd2cdec496.png)  
 ![0c449a7b41e7518d302bb3602ee2ccd](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/2/246534f14b4e29fd3e92ab0e8952bdb72923f45c.png)

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [March 18, 2024, 6:57pm UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/2 "2024-03-18T18:57:34Z")

</div>

> [@chenqiang](#):
>
> However, the output file generated in the trim step of my workflow still exists, and my memory is full

Hi @chenqiang

As a guess, the files are used in later steps since those are the post-QA core fastqsanger data, correct?

Read files are usually the largest files in any analysis and can definitely explode the quota usage.

**Try this if quota space is limited:**

1. Remove the _raw read files_ after QA steps
2. Keep _processed read files_ for downstream steps like mapping or assembly
3. After those steps are completed, you can then remove any non-result files.
4. Dataset files organized into collections with different _shapes_ do not consume extra quota space, since those are just references to the original files.
5. But if you introduce any changes to metadata or the file contents, those will then become new independent files that do consume quota.

In short, if you want a tool to work on a datasets, it needs to be retained until that tool completes. Once a file is not needed for any downstream tools, you can safely remove it.

You’ll have a copy of the raw files at the original pre-Upload-to-Galaxy source, so those are not needed on the server, correct?

Xref prior related Q&A – the [Running Galaxy workflows — Planemo 0.75.20 documentation](https://planemo.readthedocs.io/en/latest/running.html#workflow-execution-against-an-external-galaxy) help is what to review next. Or, maybe review some Published Galaxy workflows? Find the search on the **Workflow** link in the masthead of the web application.

- [There was a problem in creating a paired read collection using API - #11 by mvdbeek](https://help.galaxyproject.org/t/there-was-a-problem-in-creating-a-paired-read-collection-using-api/11655/11)
- [Output file problem - #2 by wm75](https://help.galaxyproject.org/t/output-file-problem/11898/2)

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [March 18, 2024, 11:06pm UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/3 "2024-03-18T23:06:58Z")

</div>

For the prior Q&A, if you think the problem is with Galaxy, please create a very simple example that demonstrates the problem. This should be against a public server where you can share all artifacts.

Three steps would be ideal: input, action1, action2. Where you want the outputs from the 2nd deleted, but specifying that in the 3rd step does not actually clean up the intermediate file.

---

<div class="post-metadata">

**Author:** ![chenqiang](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@chenqiang](https://help.galaxyproject.org/u/chenqiang)\
**Post date:** [March 19, 2024, 4:00am UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/4 "2024-03-19T04:00:48Z")

</div>

Oh,I see what you mean. The third step will not clean up the output of the second step, right? Can it only be generated and then deleted manually? Can’t I specify that the output of the second step is not in my history? Because the file I generated in the second step is very large.

---

<div class="post-metadata">

**Author:** ![chenqiang](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@chenqiang](https://help.galaxyproject.org/u/chenqiang)\
**Post date:** [March 19, 2024, 4:13am UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/5 "2024-03-19T04:13:04Z")

</div>

This is my workflow, please take a look at it for me: **`https://usegalaxy.eu/u/ccc123/w/copy-of-metag-wrokflow`**

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [March 19, 2024, 5:19pm UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/6 "2024-03-19T17:19:21Z")

</div>

> [@chenqiang](#):
>
> Can’t I specify that the output of the second step is not in my history? Because the file I generated in the second step is very large.

The file must be in the active history for tools to use it.

If you are working at [Usegalaxy.org](http://Usegalaxy.org), we are introducing a new feature: scratch space. No documentation yet but you can find the toggle under User \> Preferences \> Preferred Object Store. That “database” icon is in the UI in a few places too. How it works in in the pop-ups. You could set all data to write to the scratch space. It is 1 Tb for everyone. The regular storage is still the same, and you can move data between the two.

---

<div class="post-metadata">

**Author:** ![chenqiang](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@chenqiang](https://help.galaxyproject.org/u/chenqiang)\
**Post date:** [March 19, 2024, 6:15pm UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/8 "2024-03-19T18:15:17Z")

</div>

Oh，I tried it.So I can download it to scratch space by default by clicking on it?  
 ![41ba353a4ea8d0885eae9a969696e55](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/3/331187d7ea8d9c4b739a16b5618062763c3ce8b6.png)

---

<div class="post-metadata">

**Author:** ![chenqiang](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@chenqiang](https://help.galaxyproject.org/u/chenqiang)\
**Post date:** [March 19, 2024, 6:18pm UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/9 "2024-03-19T18:18:09Z")

</div>

If so, I highly recommend that this function should also be available in [usegalaxy.eu](http://usegalaxy.eu), because it is very important for users who store large amounts of data.

---

<div class="post-metadata">

**Author:** ![chenqiang](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@chenqiang](https://help.galaxyproject.org/u/chenqiang)\
**Post date:** [March 19, 2024, 6:23pm UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/10 "2024-03-19T18:23:29Z")

</div>

Because all my work is done in [usegalaxy.eu](http://usegalaxy.eu), and there are many tools in usegalaxy.eu.I hope you can also add temporary space in [usegalaxy.eu](http://usegalaxy.eu)

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [March 19, 2024, 11:40pm UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/11 "2024-03-19T23:40:51Z")

</div>

@chenqiang , this is only a few days old. We are testing it out at [UseGalaxy.org](http://UseGalaxy.org) first. I don’t know if or when the EU server would introduce this.

You can work at any of the public servers 🙂

---

<div class="post-metadata">

**Author:** ![chenqiang](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@chenqiang](https://help.galaxyproject.org/u/chenqiang)\
**Post date:** [March 20, 2024, 3:44am UTC](https://help.galaxyproject.org/t/the-intermediate-output-file-still-exists/11940/12 "2024-03-20T03:44:37Z")

</div>

Oh，Thank you for your answer, mainly because many of the tools I use are not available in UseGalaxy.org.Only in EU server
