1 minute read

My Mac is nearly always on the verge of running out of disk space, despite the fact that I offload older projects/datasets onto my external 2TB SSD drive.

I’ve been good at weeding out old models in my ollama (very easy in CLI: first ollama list, then ollama rm <MODEL>), but the space was still somehow magically disappearing.

Something is telling me I’m not alone, so thought I’d summarise some other cleaning steps I did this week to free up nearly 100GB of completely dead weight!

1. See what’s taking up space

du -sh ~/.cache/* ~/miniconda3/envs/* ~/miniconda3/pkgs 2>/dev/null | sort -h

2. Conda

conda clean --all --dry-run   # preview
conda clean --all             # tarballs, index cache, unused packages

conda env list                                   # what do I have?
conda env export -n old_env > old_env.yml        # optional: keep a recipe
conda env remove -n old_env

Cleaning is safe because you can download the packages again when you need them. But removing an environment is permanent unless you export it.

3. pip

pip cache purge

4. Hugging Face

Hugging Face gives you the ‘last accessed’ date which is very convenient in deciding what to keep and what to remove.

hf cache scan     # models & datasets, with size and last accessed
hf cache delete   # interactive picker

Deleted models will be downloaded again the next time your code loads them, but large ones take a while. Also let’s face it: you are unlikely to rerun anything you haven’t touched in a year…

Also worth checking

uv cache clean               # if you use uv
rm -rf ~/.cache/torch/hub    # torch.hub models, re-downloaded on demand

Updated: