Definitely the best way to uninstall all pypi packages in a conda environment is:
conda activate <your-env>
conda list | awk '/pypi/ {print $1}' | xargs pip uninstall -y
Answer from Luis Chaves Rodriguez on Stack OverflowDefinitely the best way to uninstall all pypi packages in a conda environment is:
conda activate <your-env>
conda list | awk '/pypi/ {print $1}' | xargs pip uninstall -y
You can use Jupyter Notebook to solve this problem :
- open Jupyter Notebook
- open a new notebook with the right kernel
- type
!pip uninstall -y [package]in a code cell - run the cell code
Anaconda remove package manually
Python Anaconda - How to Safely Uninstall - Stack Overflow
python - Conda uninstall one package and one package only - Stack Overflow
Question: Can I delete Anaconda?
How to check if Anaconda is installed or not?
Where is Anaconda installed on a Mac?
Videos
Hi, I'm stuck on solving Environment, which looking on github is now a new error. How can I uninstall this manually, as I'm not interested in solving problems for anaconda, but I do need to get rid of this particular package as it's the wrong version and anaconda does not have the up to date version. If it's important it's django-crispy-forms, anaconda only has 1.7 which is not compatible with Django3. So need to remove this and pip install the correct one. Can I just find it in my virtual env folder and remove it, or are there metadata links that will cause problems?
From the docs:
To uninstall Anaconda open a terminal window and remove the entire anaconda install directory:
rm -rf ~/anaconda. You may also edit~/.bash_profileand remove the anaconda directory from yourPATHenvironment variable, and remove the hidden.condarcfile and.condaand.continuumdirectories which may have been created in the home directory withrm -rf ~/.condarc ~/.conda ~/.continuum.
Further notes:
- Python3 installs may use a
~/anaconda3dir instead of~/anaconda. - You might also have a
~/.anacondahidden directory that may be removed. - Depending on how you installed, it is possible that the
PATHis modified in one of your runcom files, and not in your shell profile. So, for example if you are using bash, be sure to check your~/.bashrcif you don't find thePATHmodified in~/.bash_profile.
The anaconda installer adds a line in your ~/.bash_profile script that prepends the anaconda bin directory to your $PATH environment variable. Deleting the anaconda directory should be all you need to do, but it's good housekeeping to remove this line from your setup script too.