I am using Anaconda. I would like to know how to remove or uninstall unwanted packages from the base environment. I am using another environment for my coding purpose.
I tried to update my environment by using yml file (Not base environment). Unexpectedly some packages installed by yml into the base environment. So now it has 200 python packages which have another environment also. I want to clear unwanted packages in the base environment and I am not using any packages in the base environment. Also, my memory is full because of this.
Please give me a solution to remove unwanted packages in the base environment in anaconda.
It is very hard to remove one by one each package, therefore, I am looking for a better solution.
"conda clean --all --dry-run" is listing unused packages as well. (mycondaenv) C:\myrepo>conda clean --packages --dry-run Will remove 685 (9.45 GB) package(s).
From the R terminal enter the command remove. packages("package-to-remove") to remove or uninstall the package from R environment.
Remove a list of packages from a specified conda environment. This command will also remove any package that depends on any of the specified packages as well---unless a replacement can be found without that dependency.
It is the same as for other environments:
conda deactivate
to be sure you are in the base environment.conda list
to see the packages that you have installedconda remove {package_name}
to remove packagesUpdate:
WARNING: Be careful because there are bugs around this new functionality https://github.com/conda/conda/issues/6316
I have not tested it myself, so try at your own risk
To reset your base environment you should:
conda list --revisions
This will show you a list of revisions. At this moment, the latest is:
2019-02-11 21:58:57 (rev 19)
conda {4.6.2 -> 4.6.3}
Now run, where 19 can be replaced for the revision you want to use:
conda install --rev 19
If you use:
conda install --rev 1
Then it should reset the base environment to how it looked like when you installed anaconda.
Reference: https://github.com/conda/conda/issues/1032
According to the tickets, if you are not using conda 4.4 release
or upwards, you may end up removing conda too because of this bug: https://github.com/conda/conda/issues/6316
conda remove <package_name>
More info can be found: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#removing-packages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With