Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove downloaded tensorflow and pytorch(Hugging face) models

I would like to remove tensorflow and hugging face models from my laptop. I did find one link https://github.com/huggingface/transformers/issues/861 but is there not command that can remove them because as mentioned in the link manually deleting can cause problems because we don't know which other files are linked to those models or are expecting some model to be present in that location or simply it may cause some error.

like image 206
Hitesh Somani Avatar asked Sep 02 '25 01:09

Hitesh Somani


1 Answers

Use

pip install huggingface_hub["cli"]

Then

huggingface-cli delete-cache

You should now see a list of revisions that you can select/deselect.

See this link for details.

like image 126
rivu Avatar answered Sep 04 '25 22:09

rivu