# BuilderScript cleanup during extract of archives

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbuilderscript-cleanup-during-extract-of-archives%2F120170%3E%5C
**Category:** 🤗Datasets\
**Created:** [November 14, 2024, 3:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbuilderscript-cleanup-during-extract-of-archives%2F120170 "2024-11-14T15:02:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwirth7](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@mwirth7](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmwirth7)%5C
**Post date:** [November 14, 2024, 3:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbuilderscript-cleanup-during-extract-of-archives%2F120170%2F1 "2024-11-14T15:02:23Z")

</div>

I am working on the [BirdSet](https://huggingface.co/datasets/DBD-research-group/BirdSet) dataset. We recently noticed that after the tar files are downloaded and extracted the size is double, because archives and audio files both remain in the cache folder.

So far i tried to simply extract the files using the provided download manager one by one and deleting the archive path. Which is the behaviour i am looking for. But when doing that the ‘generate\_example’ function fails by reading the just deleted archive.  
So far i have not found a solution that follows this behaviour and doesn’t break streaming.

My question: Is there a simple way to delete the archives as soon as they aren’t needed anymore (after the extraction)?  
This way users would not need double the storage space of the original files.
