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.
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>
可以找到更多信息: https : //conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#removing-packages
请使用以下代码: conda uninstall -n base <Package_name>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.