I have a conda virtual environment with several unused packages installed inside it (using pip install or conda install ).
pip install
conda install
What is the easiest way to clear it so that only packages that are actually used by my code remain and the rest are removed?
conda clean --yes --all
will disinfect everything. But note: if you ever want to perform any --offline operation, do not use --all ; be more selective.
--offline
--all