# Load\_dataset without saving cache files

**URL:** <https://discuss.huggingface.co/t/load-dataset-without-saving-cache-files/36835>\
**Category:** 🤗Datasets\
**Created:** [April 17, 2023, 10:33am UTC](https://discuss.huggingface.co/t/load-dataset-without-saving-cache-files/36835 "2023-04-17T10:33:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YunT](https://avatars.discourse-cdn.com/v4/letter/y/b5ac83/32.png) [@YunT](https://discuss.huggingface.co/u/YunT)\
**Post date:** [April 17, 2023, 10:33am UTC](https://discuss.huggingface.co/t/load-dataset-without-saving-cache-files/36835/1 "2023-04-17T10:33:10Z")

</div>

I want to load the dataset without saving cache file or delete the cache file after use.  
so i use cleanup\_cache\_files() function after use dataset file likes:

```auto
from datasets import load_dataset
dataset = load_dataset('cc100',lang='ar',split='train')
dataset.cleanup_cache_files()
```

but it didn’t delete cache file in .cache/huggingface/datasets  
How can I avoid storing cache files or delete them automatically after use?

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/52888_2.png) [@lhoestq](https://discuss.huggingface.co/u/lhoestq)\
**Post date:** [April 19, 2023, 10:27am UTC](https://discuss.huggingface.co/t/load-dataset-without-saving-cache-files/36835/2 "2023-04-19T10:27:47Z")

</div>

`cleanup_cache_files` removes the arrow cache files of the Dataset

However the downloaded files used to prepare the arrow cache files are still in `.cache/huggingface/datasets/downloads` that you can delete if you want
