Bottom Line: It is 100% safe to delete the PyTorch model weights cache. Deleting ~/.cache/torch will NOT delete your Python AI scripts, Jupyter Notebooks, or custom training datasets.
What is the PyTorch Cache Folder?
Located at ~/.cache/torch on Linux/macOS (and %USERPROFILE%\.cache\torch on Windows), this folder is created by PyTorch and PyTorch Hub.
When running deep learning models (ResNet, YOLO, Whisper, Stable Diffusion, or vision transformers), PyTorch downloads pre-trained model weights (.pt, .pth, .bin files) into checkpoints/ and hub/. Because AI model weights weigh 500 MB to 5 GB each, experimenting with multiple neural networks hoards 15 GB to 50 GB+.
Can You Delete PyTorch Cache?
✅ Yes, it is completely safe to delete.
- No code loss: Your Python training code and model architectures remain 100% safe.
- Auto-downloaded: PyTorch will simply re-download pre-trained weights from PyTorch Hub when you run model inference scripts.
How to Safely Clean Up PyTorch Model Cache
Method 1: Delete via Terminal
# macOS / Linux
rm -rf ~/.cache/torch/hub/checkpoints/*
# Windows (PowerShell)
Remove-Item -Recurse -Force $env:USERPROFILE\.cache\torch\hub\checkpoints\*
Related Guides
- Learn about deleting Hugging Face cache.
- How to clean up pip cache.
- Check if you can clean Python venv folders.
Discussion
Loading authentication...