I can\'t find any command to uninstall and remove all PyTorch dependencies. Even on the pytorch.org website.
I installed PyTorch with
conda install p
Perhaps @Schütze meant with "This does not remove all the files." that there are still files in the Anaconda\pkgs folder.
Mind that you can remove the tar.b2 and the folder of the now unused packages in Anaconda\pkgs. I uninstalled pytorch cuda version (because my display driver does not support cuda) and there were huge files there:
This makes 3 GB altogether! Either do this manually, or with a command:
to delete all unneeded packages:
conda clean --yes --packages --dry-run
to delete all unneeded tar.bz2 / conda
conda clean --yes --tarballs --dry-run
to delete all together
conda clean --yes --all --dry-run
First use parameter --dry-run to see what will happen. Afterwards, run without --dry-run. This has cleaned about 3.5 GB of the used 7 GB disk space that was used by Anaconda\pkgs.
References: How to uninstall all unused packages in a conda virtual environment? and Anaconda Python: Delete .tar.gz in pkgs