Source: https://stackoverflow.com/questions/36308531/how-to-uninstall-all-unused-packages-in-a-conda-virtual-environment

If you are anything like me you start multiple data science projects. To make things a little easier I make multiple conda environments. Conda does a decent job at reducing the space used my the packages[^symlinks]. But over time the conda folders can become boated. It’s a good idea to do this regularly.

conda clean --yes --all

The all flag clears packages, and tarball used in the installation process.

You can also add a dry-run flag:

conda clean --all --dry-run

to check the size of unused packages. Can be quite large, if you have deleted/updated any conda environment!