# How can I clean the dataset cache?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-clean-the-dataset-cache%2F73033%3E%5C
**Category:** 🤗Datasets\
**Created:** [February 13, 2024, 4:59pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-clean-the-dataset-cache%2F73033 "2024-02-13T16:59:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![denis-kazakov](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/denis-kazakov/32/28314_2.png) [@denis-kazakov](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdenis-kazakov)%5C
**Post date:** [February 13, 2024, 4:59pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-clean-the-dataset-cache%2F73033%2F1 "2024-02-13T16:59:26Z")

</div>

The datasets cache (/.cache/huggingface/datasets/) is taking up a lot of space with data that I no longer need and can’t even remember which dataset they come from. How can I clear this cache?

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/52888_2.png) [@lhoestq](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flhoestq)%5C
**Post date:** [February 19, 2024, 4:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-clean-the-dataset-cache%2F73033%2F2 "2024-02-19T16:35:26Z")

</div>

Feel free to delete the `download` directory. Then all the other directories are named after the datasets, and contain the cache files when you do `load_dataset()` and to reload cached `map()` results

---

<div class="post-metadata">

**Author:** ![denis-kazakov](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/denis-kazakov/32/28314_2.png) [@denis-kazakov](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdenis-kazakov)%5C
**Post date:** [February 24, 2024, 7:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-clean-the-dataset-cache%2F73033%2F3 "2024-02-24T19:14:27Z")

</div>

Thank you!  
I also have a bunch of other directories named like .cache/huggingface/datasets/csv/default-60ad0c15aa7a6ff6/0.0.0/  
I guess these are caches of datasets that I created and can delete them without breaking the system. They simply won’t be available any more, right?

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/52888_2.png) [@lhoestq](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flhoestq)%5C
**Post date:** [February 26, 2024, 6:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-clean-the-dataset-cache%2F73033%2F4 "2024-02-26T18:35:19Z")

</div>

Yes correct. To be more specific they correspond to the cache of the datasets that you loaded with `load_dataset("csv" ...)` (it’s also the old location for datasets in CSV format from the Hugging Face Hub)

---

<div class="post-metadata">

**Author:** ![denis-kazakov](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/denis-kazakov/32/28314_2.png) [@denis-kazakov](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdenis-kazakov)%5C
**Post date:** [March 1, 2024, 10:08am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-clean-the-dataset-cache%2F73033%2F5 "2024-03-01T10:08:05Z")

</div>

Thank you for your help!
